Chromium Code Reviews| OLD | NEW |
|---|---|
| (Empty) | |
| 1 // Copyright 2014 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_COMPONENT_TOOLBAR_ACTIONS_FACTORY_H_ | |
| 6 #define CHROME_BROWSER_UI_TOOLBAR_COMPONENT_TOOLBAR_ACTIONS_FACTORY_H_ | |
| 7 | |
| 8 #include "base/macros.h" | |
| 9 #include "base/memory/scoped_vector.h" | |
| 10 | |
| 11 class Profile; | |
| 12 class ToolbarActionViewController; | |
| 13 | |
| 14 // The registry for all component toolbar actions. Component toolbar actions | |
| 15 // are actions that live in the toolbar (like extension actions), but are | |
| 16 // components of chrome, such as ChromeCast. | |
| 17 class ComponentToolbarActionsFactory { | |
| 18 public: | |
| 19 ComponentToolbarActionsFactory(); | |
| 20 ~ComponentToolbarActionsFactory(); | |
| 21 | |
| 22 static ComponentToolbarActionsFactory* GetInstance(); | |
| 23 | |
| 24 // Returns a collection of controllers for Chrome Actions. Declared virtual | |
| 25 // for testing. | |
| 26 virtual ScopedVector<ToolbarActionViewController> | |
| 27 GetComponentToolbarActions(); | |
| 28 | |
| 29 // Sets the factory to use for testing purposes. | |
|
sky
2014/10/16 23:03:33
nit: document ownership.
Devlin
2014/10/17 16:33:32
Done.
| |
| 30 static void SetTestingFactory(ComponentToolbarActionsFactory* factory); | |
| 31 | |
| 32 private: | |
| 33 DISALLOW_COPY_AND_ASSIGN(ComponentToolbarActionsFactory); | |
| 34 }; | |
| 35 | |
| 36 #endif // CHROME_BROWSER_UI_TOOLBAR_COMPONENT_TOOLBAR_ACTIONS_FACTORY_H_ | |
| OLD | NEW |