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

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

Issue 1228223002: Close wrench menu when Media Router Action clicked in Views. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix browser test. Created 5 years, 5 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.cc
diff --git a/chrome/browser/ui/toolbar/component_toolbar_actions_factory.cc b/chrome/browser/ui/toolbar/component_toolbar_actions_factory.cc
index c50d1784a248e39c94ea6ab0abe18364f0a67d3a..8f64c079393ae0495e3344bb9b04ca3610bcdd75 100644
--- a/chrome/browser/ui/toolbar/component_toolbar_actions_factory.cc
+++ b/chrome/browser/ui/toolbar/component_toolbar_actions_factory.cc
@@ -30,7 +30,7 @@ ComponentToolbarActionsFactory* ComponentToolbarActionsFactory::GetInstance() {
}
ScopedVector<ToolbarActionViewController>
-ComponentToolbarActionsFactory::GetComponentToolbarActions() {
+ComponentToolbarActionsFactory::GetComponentToolbarActions(Browser* browser) {
ScopedVector<ToolbarActionViewController> component_actions;
// This is currently behind the extension-action-redesign flag, as it is
@@ -48,16 +48,16 @@ ComponentToolbarActionsFactory::GetComponentToolbarActions() {
#if defined(ENABLE_MEDIA_ROUTER)
if (base::CommandLine::ForCurrentProcess()->HasSwitch(
::switches::kEnableMediaRouter)) {
- component_actions.push_back(new MediaRouterAction());
+ component_actions.push_back(new MediaRouterAction(browser));
}
#endif
return component_actions.Pass();
}
-int ComponentToolbarActionsFactory::GetNumComponentActions() {
+int ComponentToolbarActionsFactory::GetNumComponentActions(Browser* browser) {
if (num_component_actions_ == -1)
- num_component_actions_ = GetComponentToolbarActions().size();
+ num_component_actions_ = GetComponentToolbarActions(browser).size();
return num_component_actions_;
}

Powered by Google App Engine
This is Rietveld 408576698