Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1005)

Unified Diff: chrome/browser/ui/toolbar/component_toolbar_actions_factory.h

Issue 661493004: Add infrastructure for Chrome Actions (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: chrome/browser/ui/toolbar/component_toolbar_actions_factory.h
diff --git a/chrome/browser/ui/toolbar/component_toolbar_actions_factory.h b/chrome/browser/ui/toolbar/component_toolbar_actions_factory.h
new file mode 100644
index 0000000000000000000000000000000000000000..42c0cdcaade06dbdea99af39ae22b3da12d89437
--- /dev/null
+++ b/chrome/browser/ui/toolbar/component_toolbar_actions_factory.h
@@ -0,0 +1,37 @@
+// 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_TOOLBAR_COMPONENT_TOOLBAR_ACTIONS_FACTORY_H_
+#define CHROME_BROWSER_UI_TOOLBAR_COMPONENT_TOOLBAR_ACTIONS_FACTORY_H_
+
+#include "base/macros.h"
+#include "base/memory/scoped_vector.h"
+
+class Profile;
+class ToolbarActionViewController;
+
+// The registry for all component toolbar actions. Component toolbar actions
+// are actions that live in the toolbar (like extension actions), but are
+// components of chrome, such as ChromeCast.
+class ComponentToolbarActionsFactory {
+ public:
+ ComponentToolbarActionsFactory();
+ ~ComponentToolbarActionsFactory();
+
+ static ComponentToolbarActionsFactory* GetInstance();
+
+ // Returns a collection of controllers for Chrome Actions. Declared virtual
+ // for testing.
+ virtual ScopedVector<ToolbarActionViewController>
+ GetComponentToolbarActions();
+
+ // Sets the factory to use for testing purposes.
+ // Ownership remains with the caller.
+ static void SetTestingFactory(ComponentToolbarActionsFactory* factory);
+
+ private:
+ DISALLOW_COPY_AND_ASSIGN(ComponentToolbarActionsFactory);
+};
+
+#endif // CHROME_BROWSER_UI_TOOLBAR_COMPONENT_TOOLBAR_ACTIONS_FACTORY_H_

Powered by Google App Engine
This is Rietveld 408576698