Index: chrome/browser/ui/views/toolbar/chrome_actions_registry.h |
diff --git a/chrome/browser/ui/views/toolbar/chrome_actions_registry.h b/chrome/browser/ui/views/toolbar/chrome_actions_registry.h |
new file mode 100644 |
index 0000000000000000000000000000000000000000..02c5f543527e5e9b8812371f837701a04a9714d1 |
--- /dev/null |
+++ b/chrome/browser/ui/views/toolbar/chrome_actions_registry.h |
@@ -0,0 +1,30 @@ |
+// Copyright 2014 The Chromium Authors. All rights reserved. |
+// Use of this source code is governed by a BSD-style license that can be |
+// found in the LICENSE file. |
+ |
+#ifndef CHROME_BROWSER_UI_VIEWS_TOOLBAR_CHROME_ACTIONS_REGISTRY_H_ |
sky
2014/10/15 23:52:30
I assume this is going to be on mac too? Shouldn't
Devlin
2014/10/16 16:46:38
I had it in ui/toolbar at first, but currently all
sky
2014/10/16 18:13:39
views on mac is a ways out, I don't even think the
Devlin
2014/10/16 22:05:27
Mmkay, promoted to ui/toolbar.
|
+#define CHROME_BROWSER_UI_VIEWS_TOOLBAR_CHROME_ACTIONS_REGISTRY_H_ |
+ |
+#include "base/macros.h" |
+#include "base/memory/scoped_vector.h" |
+ |
+class Profile; |
+class ToolbarActionViewController; |
+ |
+// The registry for all chrome actions. Chrome actions are actions that live in |
+// the toolbar (like extension actions), but are components of chrome, such as |
+// ChromeCast. |
+class ChromeActionsRegistry { |
sky
2014/10/15 23:52:30
nit: I don't think Chrome is very descriptive in t
Devlin
2014/10/16 16:46:38
Fair point regarding descriptiveness. I'm kind of
sky
2014/10/16 18:13:39
ic. Chrome is an umbrella term, and on a casual re
Devlin
2014/10/16 22:05:27
Is the new name from Patch Set 2 (ComponentToolbar
|
+ public: |
+ // For readability, a pointer to a function that has the same signature as |
+ // GetChromeActions(). |
+ typedef ScopedVector<ToolbarActionViewController> (*FactoryFunction)(void); |
+ |
+ // Returns a collection of controllers for Chrome Actions. |
+ static ScopedVector<ToolbarActionViewController> GetChromeActions(); |
+ |
+ // Set a substitute function to create the chrome actions for testing. |
+ static void SetTestingChromeActionsFunction(FactoryFunction function); |
sky
2014/10/15 23:52:30
Can tests inject an implementation of this class r
Devlin
2014/10/16 16:46:38
Sure. It actually seemed a little messier to me t
|
+}; |
+ |
+#endif // CHROME_BROWSER_UI_VIEWS_TOOLBAR_CHROME_ACTIONS_REGISTRY_H_ |