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 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, | 20 gfx::Image GetIcon(content::WebContents* web_contents, |
21 const gfx::Size& size) 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; |
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
70 // Whether or not a click on a disabled action should open the context menu. | 70 // Whether or not a click on a disabled action should open the context menu. |
71 bool disabled_click_opens_menu_; | 71 bool disabled_click_opens_menu_; |
72 | 72 |
73 // The number of times the action would have been executed. | 73 // The number of times the action would have been executed. |
74 int execute_action_count_; | 74 int execute_action_count_; |
75 | 75 |
76 DISALLOW_COPY_AND_ASSIGN(TestToolbarActionViewController); | 76 DISALLOW_COPY_AND_ASSIGN(TestToolbarActionViewController); |
77 }; | 77 }; |
78 | 78 |
79 #endif // CHROME_BROWSER_UI_TOOLBAR_TEST_TOOLBAR_ACTION_VIEW_CONTROLLER_H_ | 79 #endif // CHROME_BROWSER_UI_TOOLBAR_TEST_TOOLBAR_ACTION_VIEW_CONTROLLER_H_ |
OLD | NEW |