| Index: ui/views/controls/button/vector_icon_button.h
|
| diff --git a/chrome/browser/ui/views/bar_control_button.h b/ui/views/controls/button/vector_icon_button.h
|
| similarity index 46%
|
| rename from chrome/browser/ui/views/bar_control_button.h
|
| rename to ui/views/controls/button/vector_icon_button.h
|
| index 902f328b90dd17867e767c4cdbd4416878264eee..3b48764b198480b7fe0e53d1d3ade6f13f5d621f 100644
|
| --- a/chrome/browser/ui/views/bar_control_button.h
|
| +++ b/ui/views/controls/button/vector_icon_button.h
|
| @@ -2,12 +2,9 @@
|
| // 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_BAR_CONTROL_BUTTON_H_
|
| -#define CHROME_BROWSER_UI_VIEWS_BAR_CONTROL_BUTTON_H_
|
| +#ifndef UI_VIEWS_CONTROLS_BUTTON_VECTOR_ICON_BUTTON_H_
|
| +#define UI_VIEWS_CONTROLS_BUTTON_VECTOR_ICON_BUTTON_H_
|
|
|
| -#include <memory>
|
| -
|
| -#include "base/callback.h"
|
| #include "base/macros.h"
|
| #include "ui/views/controls/button/image_button.h"
|
|
|
| @@ -15,27 +12,33 @@ namespace gfx {
|
| enum class VectorIconId;
|
| }
|
|
|
| -// A class for buttons that control bars (find bar, download shelf, etc.). The
|
| -// button has an image and no text.
|
| -class BarControlButton : public views::ImageButton {
|
| +namespace views {
|
| +
|
| +class VectorIconButtonDelegate;
|
| +
|
| +// A button that has an image and no text, with the image defined by a vector
|
| +// icon identifier.
|
| +class VIEWS_EXPORT VectorIconButton : public views::ImageButton {
|
| public:
|
| - explicit BarControlButton(views::ButtonListener* listener);
|
| - ~BarControlButton() override;
|
| + explicit VectorIconButton(VectorIconButtonDelegate* delegate);
|
| + ~VectorIconButton() override;
|
|
|
| // Sets the icon to display and provides a callback which should return the
|
| // text color from which to derive this icon's color.
|
| - void SetIcon(gfx::VectorIconId id,
|
| - const base::Callback<SkColor(void)>& get_text_color_callback);
|
| + void SetIcon(gfx::VectorIconId id);
|
|
|
| // views::ImageButton:
|
| + void OnEnabledChanged() override;
|
| void OnThemeChanged() override;
|
| void OnNativeThemeChanged(const ui::NativeTheme* theme) override;
|
|
|
| private:
|
| + VectorIconButtonDelegate* delegate_;
|
| gfx::VectorIconId id_;
|
| - base::Callback<SkColor(void)> get_text_color_callback_;
|
|
|
| - DISALLOW_COPY_AND_ASSIGN(BarControlButton);
|
| + DISALLOW_COPY_AND_ASSIGN(VectorIconButton);
|
| };
|
|
|
| -#endif // CHROME_BROWSER_UI_VIEWS_BAR_CONTROL_BUTTON_H_
|
| +} // namespace views
|
| +
|
| +#endif // UI_VIEWS_CONTROLS_BUTTON_VECTOR_ICON_BUTTON_H_
|
|
|