chromium/chrome/browser/ui/views/tabs/fade_view.h

// Copyright 2023 The Chromium Authors
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

#ifndef CHROME_BROWSER_UI_VIEWS_TABS_FADE_VIEW_H_
#define CHROME_BROWSER_UI_VIEWS_TABS_FADE_VIEW_H_

#include <type_traits>

#include "ui/base/metadata/metadata_cache.h"
#include "ui/base/metadata/metadata_types.h"
#include "ui/color/color_provider.h"
#include "ui/gfx/animation/tween.h"
#include "ui/views/background.h"
#include "ui/views/layout/fill_layout.h"
#include "ui/views/layout/flex_layout_types.h"
#include "ui/views/view.h"
#include "ui/views/view_class_properties.h"

// Adapts any view `T` so that the view can fade when used by a FadeView
template <typename T, typename V>
class FadeWrapper : public T {};

// Cross fades any view so that view `U` is the old view that would be faded
// away. This allows view `T` to fade in for the user to ensure a smooth
// transition from the view with the old data `U` to the updated data in `T`
template <typename T, typename U, typename V>
class FadeView : public views::View {};

#endif  // CHROME_BROWSER_UI_VIEWS_TABS_FADE_VIEW_H_