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(); |
+} |