| OLD | NEW |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | 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 | 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_TOOLBAR_TEST_TOOLBAR_ACTION_VIEW_CONTROLLER_H_ | 5 #ifndef CHROME_BROWSER_UI_TOOLBAR_TEST_TOOLBAR_ACTION_VIEW_CONTROLLER_H_ |
| 6 #define CHROME_BROWSER_UI_TOOLBAR_TEST_TOOLBAR_ACTION_VIEW_CONTROLLER_H_ | 6 #define CHROME_BROWSER_UI_TOOLBAR_TEST_TOOLBAR_ACTION_VIEW_CONTROLLER_H_ |
| 7 | 7 |
| 8 #include "chrome/browser/ui/toolbar/toolbar_action_view_controller.h" | 8 #include "chrome/browser/ui/toolbar/toolbar_action_view_controller.h" |
| 9 | 9 |
| 10 // A minimalistic and configurable ToolbarActionViewController for use in | 10 // A minimalistic and configurable ToolbarActionViewController for use in |
| 11 // testing. | 11 // testing. |
| 12 class TestToolbarActionViewController : public ToolbarActionViewController { | 12 class TestToolbarActionViewController : public ToolbarActionViewController { |
| 13 public: | 13 public: |
| 14 explicit TestToolbarActionViewController(const std::string& id); | 14 explicit TestToolbarActionViewController(const std::string& id); |
| 15 ~TestToolbarActionViewController() override; | 15 ~TestToolbarActionViewController() override; |
| 16 | 16 |
| 17 // ToolbarActionViewController: | 17 // ToolbarActionViewController: |
| 18 const std::string& GetId() const override; | 18 const std::string& GetId() const override; |
| 19 void SetDelegate(ToolbarActionViewDelegate* delegate) override; | 19 void SetDelegate(ToolbarActionViewDelegate* delegate) override; |
| 20 gfx::Image GetIcon(content::WebContents* web_contents) override; | 20 gfx::Image GetIcon(content::WebContents* web_contents, |
| 21 gfx::ImageSkia GetIconWithBadge() override; | 21 const gfx::Size& size) override; |
| 22 base::string16 GetActionName() const override; | 22 base::string16 GetActionName() const override; |
| 23 base::string16 GetAccessibleName(content::WebContents* web_contents) | 23 base::string16 GetAccessibleName(content::WebContents* web_contents) |
| 24 const override; | 24 const override; |
| 25 base::string16 GetTooltip(content::WebContents* web_contents) | 25 base::string16 GetTooltip(content::WebContents* web_contents) |
| 26 const override; | 26 const override; |
| 27 bool IsEnabled(content::WebContents* web_contents) const override; | 27 bool IsEnabled(content::WebContents* web_contents) const override; |
| 28 bool WantsToRun(content::WebContents* web_contents) const override; | 28 bool WantsToRun(content::WebContents* web_contents) const override; |
| 29 bool HasPopup(content::WebContents* web_contents) const override; | 29 bool HasPopup(content::WebContents* web_contents) const override; |
| 30 void HidePopup() override; | 30 void HidePopup() override; |
| 31 gfx::NativeView GetPopupNativeView() override; | 31 gfx::NativeView GetPopupNativeView() override; |
| (...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 65 // Whether or not the action wants to run. Defaults to false. | 65 // Whether or not the action wants to run. Defaults to false. |
| 66 bool wants_to_run_; | 66 bool wants_to_run_; |
| 67 | 67 |
| 68 // The number of times the action would have been executed. | 68 // The number of times the action would have been executed. |
| 69 int execute_action_count_; | 69 int execute_action_count_; |
| 70 | 70 |
| 71 DISALLOW_COPY_AND_ASSIGN(TestToolbarActionViewController); | 71 DISALLOW_COPY_AND_ASSIGN(TestToolbarActionViewController); |
| 72 }; | 72 }; |
| 73 | 73 |
| 74 #endif // CHROME_BROWSER_UI_TOOLBAR_TEST_TOOLBAR_ACTION_VIEW_CONTROLLER_H_ | 74 #endif // CHROME_BROWSER_UI_TOOLBAR_TEST_TOOLBAR_ACTION_VIEW_CONTROLLER_H_ |
| OLD | NEW |