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