Chromium Code Reviews| OLD | NEW |
|---|---|
| (Empty) | |
| 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 | |
| 3 // found in the LICENSE file. | |
| 4 | |
| 5 #ifndef CHROME_BROWSER_UI_TOOLBAR_MOCK_COMPONENT_TOOLBAR_ACTIONS_FACTORY_H_ | |
| 6 #define CHROME_BROWSER_UI_TOOLBAR_MOCK_COMPONENT_TOOLBAR_ACTIONS_FACTORY_H_ | |
| 7 | |
| 8 #include "chrome/browser/ui/toolbar/component_toolbar_actions_factory.h" | |
| 9 #include "chrome/browser/ui/toolbar/toolbar_actions_model.h" | |
| 10 | |
| 11 class Browser; | |
| 12 | |
| 13 // Mock class used to substitute ComponentToolbarActionsFactory in tests. | |
| 14 class MockComponentToolbarActionsFactory | |
| 15 : public ComponentToolbarActionsFactory { | |
| 16 public: | |
| 17 explicit MockComponentToolbarActionsFactory(Browser* browser); | |
| 18 virtual ~MockComponentToolbarActionsFactory(); | |
|
Peter Kasting
2015/08/06 20:15:18
Nit: Use override instead of virtual for destructo
apacible
2015/08/10 22:38:11
Done. Also updated ComponentToolbarActionsFactory
| |
| 19 | |
| 20 // ComponentToolbarActionsFactory: | |
| 21 ScopedVector<ToolbarActionViewController> | |
| 22 GetComponentToolbarActions(Browser* browser) override; | |
| 23 | |
| 24 const ActionIdList action_ids() const { return action_ids_; } | |
| 25 | |
| 26 private: | |
| 27 // A set of all action ids of created actions. | |
|
Peter Kasting
2015/08/06 20:15:18
Nit: This type isn't actually a set, so don't use
apacible
2015/08/10 22:38:11
Done.
| |
| 28 ActionIdList action_ids_; | |
| 29 | |
| 30 DISALLOW_COPY_AND_ASSIGN(MockComponentToolbarActionsFactory); | |
| 31 }; | |
| 32 | |
| 33 #endif // CHROME_BROWSER_UI_TOOLBAR_MOCK_COMPONENT_TOOLBAR_ACTIONS_FACTORY_H_ | |
| OLD | NEW |