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

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: overriding Created 7 years 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
« no previous file with comments | « chrome/browser/ui/views/toolbar/home_button.cc ('k') | chrome/browser/ui/views/toolbar/reload_button.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 4d4208855c16161a7696bdaebd56bed593d9fa8e..e87cf8945dbdcbabf6fca24ae63949a1091b6c40 100644
--- a/chrome/browser/ui/views/toolbar/reload_button.h
+++ b/chrome/browser/ui/views/toolbar/reload_button.h
@@ -8,8 +8,9 @@
#include "base/basictypes.h"
#include "base/gtest_prod_util.h"
#include "base/timer/timer.h"
-#include "chrome/browser/ui/views/toolbar/button_dropdown.h"
+#include "chrome/browser/ui/views/toolbar/toolbar_button.h"
#include "ui/base/models/simple_menu_model.h"
+#include "ui/views/controls/button/button.h"
class CommandUpdater;
class LocationBarView;
@@ -25,7 +26,7 @@ class LocationBarView;
//
////////////////////////////////////////////////////////////////////////////////
-class ReloadButton : public ButtonDropDown,
+class ReloadButton : public ToolbarButton,
public views::ButtonListener,
public ui::SimpleMenuModel::Delegate {
public:
@@ -47,22 +48,20 @@ class ReloadButton : public ButtonDropDown,
void LoadImages();
- // Overridden from views::View:
+ // ToolbarButton:
virtual void OnMouseExited(const ui::MouseEvent& event) OVERRIDE;
virtual bool GetTooltipText(const gfx::Point& p,
string16* tooltip) const OVERRIDE;
virtual const char* GetClassName() const OVERRIDE;
virtual void GetAccessibleState(ui::AccessibleViewState* state) OVERRIDE;
-
- // Overridden from views::ButtonDropDown:
virtual bool ShouldShowMenu() OVERRIDE;
virtual void ShowDropDownMenu(ui::MenuSourceType source_type) OVERRIDE;
- // Overridden from views::ButtonListener:
+ // views::ButtonListener:
virtual void ButtonPressed(views::Button* /* button */,
const ui::Event& event) OVERRIDE;
- // Overridden from ui::SimpleMenuModel::Delegate:
+ // ui::SimpleMenuModel::Delegate:
virtual bool IsCommandIdChecked(int command_id) const OVERRIDE;
virtual bool IsCommandIdEnabled(int command_id) const OVERRIDE;
virtual bool IsCommandIdVisible(int command_id) const OVERRIDE;
@@ -103,11 +102,6 @@ class ReloadButton : public 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.
- // We swap between the two when changing mode.
- gfx::ImageSkia alternate_images_[STATE_COUNT];
-
// TESTING ONLY
// True if we should pretend the button is hovered.
bool testing_mouse_hovered_;
« no previous file with comments | « chrome/browser/ui/views/toolbar/home_button.cc ('k') | chrome/browser/ui/views/toolbar/reload_button.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698