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_MOCK_COMPONENT_TOOLBAR_ACTIONS_FACTORY_H_ | 5 #ifndef CHROME_BROWSER_UI_TOOLBAR_MOCK_COMPONENT_TOOLBAR_ACTIONS_FACTORY_H_ |
6 #define CHROME_BROWSER_UI_TOOLBAR_MOCK_COMPONENT_TOOLBAR_ACTIONS_FACTORY_H_ | 6 #define CHROME_BROWSER_UI_TOOLBAR_MOCK_COMPONENT_TOOLBAR_ACTIONS_FACTORY_H_ |
7 | 7 |
8 #include "chrome/browser/ui/toolbar/component_toolbar_actions_factory.h" | 8 #include "chrome/browser/ui/toolbar/component_toolbar_actions_factory.h" |
9 #include "chrome/browser/ui/toolbar/toolbar_actions_model.h" | 9 #include "chrome/browser/ui/toolbar/toolbar_actions_model.h" |
10 | 10 |
11 class Browser; | 11 class Browser; |
12 | 12 |
13 // Mock class used to substitute ComponentToolbarActionsFactory in tests. | 13 // Mock class used to substitute ComponentToolbarActionsFactory in tests. |
14 class MockComponentToolbarActionsFactory | 14 class MockComponentToolbarActionsFactory |
15 : public ComponentToolbarActionsFactory { | 15 : public ComponentToolbarActionsFactory { |
16 public: | 16 public: |
17 static const char kActionIdForTesting[]; | 17 static const char kActionIdForTesting[]; |
18 | 18 |
19 explicit MockComponentToolbarActionsFactory(Browser* browser); | 19 explicit MockComponentToolbarActionsFactory(Browser* browser); |
20 ~MockComponentToolbarActionsFactory() override; | 20 ~MockComponentToolbarActionsFactory() override; |
21 | 21 |
22 // ComponentToolbarActionsFactory: | 22 // ComponentToolbarActionsFactory: |
23 std::set<std::string> GetComponentIds(Profile* profile) override; | 23 std::set<std::string> GetComponentIds(Profile* profile) override; |
24 scoped_ptr<ToolbarActionViewController> GetComponentToolbarActionForId( | 24 scoped_ptr<ToolbarActionViewController> GetComponentToolbarActionForId( |
25 const std::string& id, | 25 const std::string& id, |
26 Browser* browser) override; | 26 Browser* browser, |
| 27 ToolbarActionsBar* bar) override; |
27 | 28 |
28 private: | 29 private: |
29 DISALLOW_COPY_AND_ASSIGN(MockComponentToolbarActionsFactory); | 30 DISALLOW_COPY_AND_ASSIGN(MockComponentToolbarActionsFactory); |
30 }; | 31 }; |
31 | 32 |
32 #endif // CHROME_BROWSER_UI_TOOLBAR_MOCK_COMPONENT_TOOLBAR_ACTIONS_FACTORY_H_ | 33 #endif // CHROME_BROWSER_UI_TOOLBAR_MOCK_COMPONENT_TOOLBAR_ACTIONS_FACTORY_H_ |
OLD | NEW |