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

Unified Diff: chrome/browser/ui/views/toolbar/media_router_action_platform_delegate_views.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: Rebase. 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/views/toolbar/media_router_action_platform_delegate_views.cc
diff --git a/chrome/browser/ui/views/toolbar/media_router_action_platform_delegate_views.cc b/chrome/browser/ui/views/toolbar/media_router_action_platform_delegate_views.cc
new file mode 100644
index 0000000000000000000000000000000000000000..34596a4ec5f081f0a1d9b2248b8b7b5e6f8b4159
--- /dev/null
+++ b/chrome/browser/ui/views/toolbar/media_router_action_platform_delegate_views.cc
@@ -0,0 +1,32 @@
+// Copyright 2015 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.
+
+#include "chrome/browser/ui/views/toolbar/media_router_action_platform_delegate_views.h"
+
+#include "chrome/browser/ui/views/frame/browser_view.h"
+#include "chrome/browser/ui/views/toolbar/toolbar_view.h"
+
+// static
+scoped_ptr<MediaRouterActionPlatformDelegate>
+MediaRouterActionPlatformDelegate::Create(Browser* browser) {
+ return make_scoped_ptr(new MediaRouterActionPlatformDelegateViews(browser));
+}
+
+MediaRouterActionPlatformDelegateViews::MediaRouterActionPlatformDelegateViews(
+ Browser* browser)
+ : MediaRouterActionPlatformDelegate(),
+ browser_(browser) {
+ DCHECK(browser_);
+}
+
+MediaRouterActionPlatformDelegateViews::
+ ~MediaRouterActionPlatformDelegateViews() {
+}
+
+void MediaRouterActionPlatformDelegateViews::CloseOverflowMenuIfOpen() {
+ ToolbarView* toolbar =
+ BrowserView::GetBrowserViewForBrowser(browser_)->toolbar();
+ if (toolbar->IsWrenchMenuShowing())
+ toolbar->CloseAppMenu();
+}
« no previous file with comments | « chrome/browser/ui/views/toolbar/media_router_action_platform_delegate_views.h ('k') | chrome/chrome_browser_ui.gypi » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698