| OLD | NEW |
| 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/macros.h" | 8 #include "base/macros.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 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 56 | 56 |
| 57 // views::ButtonListener: | 57 // views::ButtonListener: |
| 58 void ButtonPressed(views::Button* /* button */, | 58 void ButtonPressed(views::Button* /* button */, |
| 59 const ui::Event& event) override; | 59 const ui::Event& event) override; |
| 60 | 60 |
| 61 // ui::SimpleMenuModel::Delegate: | 61 // ui::SimpleMenuModel::Delegate: |
| 62 bool IsCommandIdChecked(int command_id) const override; | 62 bool IsCommandIdChecked(int command_id) const override; |
| 63 bool IsCommandIdEnabled(int command_id) const override; | 63 bool IsCommandIdEnabled(int command_id) const override; |
| 64 bool IsCommandIdVisible(int command_id) const override; | 64 bool IsCommandIdVisible(int command_id) const override; |
| 65 bool GetAcceleratorForCommandId(int command_id, | 65 bool GetAcceleratorForCommandId(int command_id, |
| 66 ui::Accelerator* accelerator) override; | 66 ui::Accelerator* accelerator) const override; |
| 67 void ExecuteCommand(int command_id, int event_flags) override; | 67 void ExecuteCommand(int command_id, int event_flags) override; |
| 68 | 68 |
| 69 private: | 69 private: |
| 70 friend class ReloadButtonTest; | 70 friend class ReloadButtonTest; |
| 71 | 71 |
| 72 ui::SimpleMenuModel* CreateMenuModel(); | 72 ui::SimpleMenuModel* CreateMenuModel(); |
| 73 | 73 |
| 74 void ExecuteBrowserCommand(int command, int event_flags); | 74 void ExecuteBrowserCommand(int command, int event_flags); |
| 75 void ChangeModeInternal(Mode mode); | 75 void ChangeModeInternal(Mode mode); |
| 76 | 76 |
| (...skipping 24 matching lines...) Expand all Loading... |
| 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_COPY_AND_ASSIGN(ReloadButton); | 107 DISALLOW_COPY_AND_ASSIGN(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_ |
| OLD | NEW |