chromium/chrome/browser/ui/views/toolbar/toolbar_icon_container_view.cc

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

#include "chrome/browser/ui/views/toolbar/toolbar_icon_container_view.h"

#include <memory>

#include "base/containers/contains.h"
#include "base/feature_list.h"
#include "base/functional/bind.h"
#include "base/memory/raw_ptr.h"
#include "base/observer_list.h"
#include "base/scoped_observation.h"
#include "chrome/browser/themes/theme_properties.h"
#include "chrome/browser/ui/color/chrome_color_id.h"
#include "chrome/browser/ui/layout_constants.h"
#include "chrome/browser/ui/views/chrome_layout_provider.h"
#include "chrome/browser/ui/views/toolbar/toolbar_button.h"
#include "chrome/browser/ui/views/toolbar/toolbar_ink_drop_util.h"
#include "extensions/common/extension_features.h"
#include "ui/base/metadata/metadata_impl_macros.h"
#include "ui/color/color_provider.h"
#include "ui/compositor/paint_recorder.h"
#include "ui/gfx/canvas.h"
#include "ui/native_theme/native_theme.h"
#include "ui/views/animation/ink_drop.h"
#include "ui/views/background.h"
#include "ui/views/layout/animating_layout_manager.h"
#include "ui/views/layout/flex_layout.h"
#include "ui/views/view_class_properties.h"
#include "ui/views/view_observer.h"

ToolbarIconContainerView::RoundRectBorder::RoundRectBorder(views::View* parent)
    :{}

void ToolbarIconContainerView::RoundRectBorder::OnPaintLayer(
    const ui::PaintContext& context) {}

void ToolbarIconContainerView::RoundRectBorder::OnDeviceScaleFactorChanged(
    float old_device_scale_factor,
    float new_device_scale_factor) {}

// Watches for widget restore (or first show) and resets the animation so icons
// don't spuriously "animate in" when a window is shown or restored. See
// crbug.com/1106506 for more details.
//
// There is currently no signal that is consistent across platforms and
// accessible from the View hierarchy that can tell us if, e.g., a window has
// been restored from a minimized state. While we could theoretically plumb
// state changes through from NativeWidget, we can observe the specific set of
// cases we want by observing the size of the window.
//
// We *cannot* observe the size of the widget itself, as at least on Windows,
// minimizing a window does not set the widget to 0x0, but rather a small,
// Windows 3.1-esque tile (~160x28) and moves it to [-32000, -32000], so far off
// the screen it can't appear on any monitor.
//
// What we can observe is the widget's root view, which is (a) always present
// after the toolbar has been added to its widget and through its entire
// lifetime, and (b) is actually set to zero size when the window is zero size
// or minimized on Windows.
class ToolbarIconContainerView::WidgetRestoreObserver
    : public views::ViewObserver {};

ToolbarIconContainerView::ToolbarIconContainerView(
    bool uses_highlight,
    bool use_default_target_layout)
    :{}

ToolbarIconContainerView::~ToolbarIconContainerView() {}

void ToolbarIconContainerView::AddMainItem(views::View* item) {}

void ToolbarIconContainerView::ObserveButton(views::Button* button) {}

void ToolbarIconContainerView::AddObserver(Observer* obs) {}

void ToolbarIconContainerView::RemoveObserver(const Observer* obs) {}

bool ToolbarIconContainerView::GetHighlighted() const {}

void ToolbarIconContainerView::OnThemeChanged() {}

void ToolbarIconContainerView::OnViewFocused(views::View* observed_view) {}

void ToolbarIconContainerView::OnViewBlurred(views::View* observed_view) {}

views::AnimatingLayoutManager*
ToolbarIconContainerView::GetAnimatingLayoutManager() {}

const views::AnimatingLayoutManager*
ToolbarIconContainerView::GetAnimatingLayoutManager() const {}

views::FlexLayout* ToolbarIconContainerView::GetTargetLayoutManager() {}

void ToolbarIconContainerView::OnBoundsChanged(
    const gfx::Rect& previous_bounds) {}

void ToolbarIconContainerView::OnMouseEntered(const ui::MouseEvent& event) {}

void ToolbarIconContainerView::OnMouseExited(const ui::MouseEvent& event) {}

void ToolbarIconContainerView::AddedToWidget() {}

void ToolbarIconContainerView::UpdateHighlight() {}

void ToolbarIconContainerView::OnButtonHighlightedChanged(
    views::Button* button) {}

BEGIN_METADATA()