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

Side by Side Diff: chrome/browser/ui/views/toolbar/reload_button.h

Issue 1492423003: Rejigger ThemeService: move exposure of ThemeProvider interface to a (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: add a test Created 5 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 unified diff | Download patch
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef CHROME_BROWSER_UI_VIEWS_TOOLBAR_RELOAD_BUTTON_H__ 5 #ifndef CHROME_BROWSER_UI_VIEWS_TOOLBAR_RELOAD_BUTTON_H__
6 #define CHROME_BROWSER_UI_VIEWS_TOOLBAR_RELOAD_BUTTON_H__ 6 #define CHROME_BROWSER_UI_VIEWS_TOOLBAR_RELOAD_BUTTON_H__
7 7
8 #include "base/basictypes.h" 8 #include "base/basictypes.h"
9 #include "base/timer/timer.h" 9 #include "base/timer/timer.h"
10 #include "chrome/browser/ui/views/toolbar/toolbar_button.h" 10 #include "chrome/browser/ui/views/toolbar/toolbar_button.h"
(...skipping 15 matching lines...) Expand all
26 26
27 class ReloadButton : public ToolbarButton, 27 class ReloadButton : public ToolbarButton,
28 public views::ButtonListener, 28 public views::ButtonListener,
29 public ui::SimpleMenuModel::Delegate { 29 public ui::SimpleMenuModel::Delegate {
30 public: 30 public:
31 enum Mode { MODE_RELOAD = 0, MODE_STOP }; 31 enum Mode { MODE_RELOAD = 0, MODE_STOP };
32 32
33 // The button's class name. 33 // The button's class name.
34 static const char kViewClassName[]; 34 static const char kViewClassName[];
35 35
36 explicit ReloadButton(CommandUpdater* command_updater); 36 ReloadButton(Profile* profile, CommandUpdater* command_updater);
37 ~ReloadButton() override; 37 ~ReloadButton() override;
38 38
39 // Ask for a specified button state. If |force| is true this will be applied 39 // Ask for a specified button state. If |force| is true this will be applied
40 // immediately. 40 // immediately.
41 void ChangeMode(Mode mode, bool force); 41 void ChangeMode(Mode mode, bool force);
42 42
43 // Enable reload drop-down menu. 43 // Enable reload drop-down menu.
44 void set_menu_enabled(bool enable) { menu_enabled_ = enable; } 44 void set_menu_enabled(bool enable) { menu_enabled_ = enable; }
45 45
46 void LoadImages(); 46 void LoadImages();
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after
101 // True if we should pretend the button is hovered. 101 // True if we should pretend the button is hovered.
102 bool testing_mouse_hovered_; 102 bool testing_mouse_hovered_;
103 // Increments when we would tell the browser to "reload", so 103 // Increments when we would tell the browser to "reload", so
104 // test code can tell whether we did so (as there may be no |browser_|). 104 // test code can tell whether we did so (as there may be no |browser_|).
105 int testing_reload_count_; 105 int testing_reload_count_;
106 106
107 DISALLOW_IMPLICIT_CONSTRUCTORS(ReloadButton); 107 DISALLOW_IMPLICIT_CONSTRUCTORS(ReloadButton);
108 }; 108 };
109 109
110 #endif // CHROME_BROWSER_UI_VIEWS_TOOLBAR_RELOAD_BUTTON_H__ 110 #endif // CHROME_BROWSER_UI_VIEWS_TOOLBAR_RELOAD_BUTTON_H__
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698