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

Side by Side Diff: chrome/browser/ui/toolbar/media_router_action.h

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 unified diff | Download patch
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef CHROME_BROWSER_UI_TOOLBAR_MEDIA_ROUTER_ACTION_H_ 5 #ifndef CHROME_BROWSER_UI_TOOLBAR_MEDIA_ROUTER_ACTION_H_
6 #define CHROME_BROWSER_UI_TOOLBAR_MEDIA_ROUTER_ACTION_H_ 6 #define CHROME_BROWSER_UI_TOOLBAR_MEDIA_ROUTER_ACTION_H_
7 7
8 #include "chrome/browser/ui/toolbar/media_router_action_platform_delegate.h"
Devlin 2015/07/16 17:17:37 Forward declaration. :)
apacible 2015/07/16 18:13:13 Done.
8 #include "chrome/browser/ui/toolbar/toolbar_action_view_controller.h" 9 #include "chrome/browser/ui/toolbar/toolbar_action_view_controller.h"
9 10
11 class Browser;
12
10 namespace media_router { 13 namespace media_router {
11 class MediaRouterDialogController; 14 class MediaRouterDialogController;
12 } // namespace media_router 15 } // namespace media_router
13 16
14 // The class for the Media Router component action that will be shown in 17 // The class for the Media Router component action that will be shown in
15 // the toolbar. 18 // the toolbar.
16 class MediaRouterAction : public ToolbarActionViewController { 19 class MediaRouterAction : public ToolbarActionViewController {
17 public: 20 public:
18 MediaRouterAction(); 21 explicit MediaRouterAction(Browser* browser);
19 ~MediaRouterAction() override; 22 ~MediaRouterAction() override;
20 23
21 // ToolbarActionViewController implementation. 24 // ToolbarActionViewController implementation.
22 const std::string& GetId() const override; 25 const std::string& GetId() const override;
23 void SetDelegate(ToolbarActionViewDelegate* delegate) override; 26 void SetDelegate(ToolbarActionViewDelegate* delegate) override;
24 gfx::Image GetIcon(content::WebContents* web_contents, 27 gfx::Image GetIcon(content::WebContents* web_contents,
25 const gfx::Size& size) override; 28 const gfx::Size& size) override;
26 base::string16 GetActionName() const override; 29 base::string16 GetActionName() const override;
27 base::string16 GetAccessibleName(content::WebContents* web_contents) 30 base::string16 GetAccessibleName(content::WebContents* web_contents)
28 const override; 31 const override;
(...skipping 17 matching lines...) Expand all
46 media_router::MediaRouterDialogController* GetMediaRouterDialogController(); 49 media_router::MediaRouterDialogController* GetMediaRouterDialogController();
47 50
48 const std::string id_; 51 const std::string id_;
49 const base::string16 name_; 52 const base::string16 name_;
50 53
51 // Cached icons. 54 // Cached icons.
52 gfx::Image media_router_idle_icon_; 55 gfx::Image media_router_idle_icon_;
53 56
54 ToolbarActionViewDelegate* delegate_; 57 ToolbarActionViewDelegate* delegate_;
55 58
59 // The delegate to handle platform-specific implementations.
60 scoped_ptr<MediaRouterActionPlatformDelegate> platform_delegate_;
61
56 DISALLOW_COPY_AND_ASSIGN(MediaRouterAction); 62 DISALLOW_COPY_AND_ASSIGN(MediaRouterAction);
57 }; 63 };
58 64
59 #endif // CHROME_BROWSER_UI_TOOLBAR_MEDIA_ROUTER_ACTION_H_ 65 #endif // CHROME_BROWSER_UI_TOOLBAR_MEDIA_ROUTER_ACTION_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698