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

Side by Side Diff: chrome/browser/ui/views/toolbar/chrome_actions_registry.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 unified diff | Download patch
OLDNEW
(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_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.
6 #define CHROME_BROWSER_UI_VIEWS_TOOLBAR_CHROME_ACTIONS_REGISTRY_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 chrome actions. Chrome actions are actions that live in
15 // the toolbar (like extension actions), but are components of chrome, such as
16 // ChromeCast.
17 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
18 public:
19 // For readability, a pointer to a function that has the same signature as
20 // GetChromeActions().
21 typedef ScopedVector<ToolbarActionViewController> (*FactoryFunction)(void);
22
23 // Returns a collection of controllers for Chrome Actions.
24 static ScopedVector<ToolbarActionViewController> GetChromeActions();
25
26 // Set a substitute function to create the chrome actions for testing.
27 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
28 };
29
30 #endif // CHROME_BROWSER_UI_VIEWS_TOOLBAR_CHROME_ACTIONS_REGISTRY_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698