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

Unified Diff: chrome/browser/ui/views/toolbar/reload_button.h

Issue 62873007: [Toolbar] Base toolbar button class with background images for button states (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Graphics from UI. Created 7 years, 1 month 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/ui/views/toolbar/reload_button.h
diff --git a/chrome/browser/ui/views/toolbar/reload_button.h b/chrome/browser/ui/views/toolbar/reload_button.h
index 16aea31abb8376a4753881677da31ad927d9ce4d..9c6c3f3e71ce4f87dd2fac354d2076efa68d8974 100644
--- a/chrome/browser/ui/views/toolbar/reload_button.h
+++ b/chrome/browser/ui/views/toolbar/reload_button.h
@@ -8,6 +8,7 @@
#include "base/basictypes.h"
#include "base/gtest_prod_util.h"
#include "base/timer/timer.h"
+#include "chrome/browser/ui/views/toolbar/toolbar_button.h"
#include "ui/base/models/simple_menu_model.h"
#include "ui/views/controls/button/button_dropdown.h"
@@ -25,8 +26,7 @@ class LocationBarView;
//
////////////////////////////////////////////////////////////////////////////////
-class ReloadButton : public views::ButtonDropDown,
- public views::ButtonListener,
+class ReloadButton : public ToolbarButton,
public ui::SimpleMenuModel::Delegate {
public:
enum Mode { MODE_RELOAD = 0, MODE_STOP };
@@ -103,8 +103,10 @@ class ReloadButton : public views::ButtonDropDown,
// Indicates if reload menu is enabled.
bool menu_enabled_;
- // The parent class's images_ member is used for the current images,
- // and this array is used to hold the alternative images.
+ // The images used to render the different states of this button.
+ gfx::ImageSkia images_[STATE_COUNT];
+
+ // Array is used to hold the alternative images.
// We swap between the two when changing mode.
gfx::ImageSkia alternate_images_[STATE_COUNT];

Powered by Google App Engine
This is Rietveld 408576698