| OLD | NEW |
| 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/toolbar_action_view_controller.h" | 8 #include "chrome/browser/ui/toolbar/toolbar_action_view_controller.h" |
| 9 | 9 |
| 10 class Browser; |
| 11 class MediaRouterActionPlatformDelegate; |
| 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 Loading... |
| 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_ |
| OLD | NEW |