Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(118)

Side by Side Diff: chrome/browser/ui/views/bar_control_button.h

Issue 2305933002: Update dialog close buttons to use vector icons and ripples. (Closed)
Patch Set: always good to compile Created 4 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
(Empty)
1 // Copyright 2015 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #ifndef CHROME_BROWSER_UI_VIEWS_BAR_CONTROL_BUTTON_H_
6 #define CHROME_BROWSER_UI_VIEWS_BAR_CONTROL_BUTTON_H_
7
8 #include <memory>
9
10 #include "base/callback.h"
11 #include "base/macros.h"
12 #include "ui/views/controls/button/image_button.h"
13
14 namespace gfx {
15 enum class VectorIconId;
16 }
17
18 // A class for buttons that control bars (find bar, download shelf, etc.). The
19 // button has an image and no text.
20 class BarControlButton : public views::ImageButton {
21 public:
22 explicit BarControlButton(views::ButtonListener* listener);
23 ~BarControlButton() override;
24
25 // Sets the icon to display and provides a callback which should return the
26 // text color from which to derive this icon's color.
27 void SetIcon(gfx::VectorIconId id,
28 const base::Callback<SkColor(void)>& get_text_color_callback);
29
30 // views::ImageButton:
31 void OnThemeChanged() override;
32 void OnNativeThemeChanged(const ui::NativeTheme* theme) override;
33
34 private:
35 gfx::VectorIconId id_;
36 base::Callback<SkColor(void)> get_text_color_callback_;
37
38 DISALLOW_COPY_AND_ASSIGN(BarControlButton);
39 };
40
41 #endif // CHROME_BROWSER_UI_VIEWS_BAR_CONTROL_BUTTON_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698