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..8f57f747a3ae534e1afbd0747243c57671f5c229 |
--- /dev/null |
+++ b/chrome/browser/ui/views/toolbar/media_router_action_platform_delegate_views.cc |
@@ -0,0 +1,33 @@ |
+// 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) |
+ : browser_(browser) { |
Devlin
2015/07/14 17:23:02
indentation off.
apacible
2015/07/14 21:15:23
Done.
|
+} |
+ |
+MediaRouterActionPlatformDelegateViews:: |
+ ~MediaRouterActionPlatformDelegateViews() { |
+} |
+ |
+void MediaRouterActionPlatformDelegateViews::CloseOverflowMenu() { |
+ if (!browser_) |
Devlin
2015/07/14 17:23:02
When can this be null?
apacible
2015/07/14 21:15:23
Hopefully never, but I added the check just in cas
Devlin
2015/07/14 21:31:07
When the answer is "never", it's always best to *n
apacible
2015/07/16 16:52:11
Thanks, done.
|
+ return; |
+ |
+ ToolbarView* toolbar = |
+ BrowserView::GetBrowserViewForBrowser(browser_)->toolbar(); |
+ if (toolbar->IsWrenchMenuShowing()) |
+ toolbar->CloseAppMenu(); |
+} |