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
3 // found in the LICENSE file.
5 #ifndef CHROME_BROWSER_UI_TOOLBAR_MEDIA_ROUTER_ACTION_H_
6 #define CHROME_BROWSER_UI_TOOLBAR_MEDIA_ROUTER_ACTION_H_
8 #include "chrome/browser/ui/toolbar/toolbar_action_view_controller.h"
10 // The class for the Media Router component action that will be shown in
12 class MediaRouterAction
: public ToolbarActionViewController
{
15 ~MediaRouterAction() override
;
17 // ToolbarActionViewController implementation.
18 const std::string
& GetId() const override
;
19 void SetDelegate(ToolbarActionViewDelegate
* delegate
) override
;
20 gfx::Image
GetIcon(content::WebContents
* web_contents
) override
;
21 gfx::ImageSkia
GetIconWithBadge() override
;
22 base::string16
GetActionName() const override
;
23 base::string16
GetAccessibleName(content::WebContents
* web_contents
)
25 base::string16
GetTooltip(content::WebContents
* web_contents
)
27 bool IsEnabled(content::WebContents
* web_contents
) const override
;
28 bool WantsToRun(content::WebContents
* web_contents
) const override
;
29 bool HasPopup(content::WebContents
* web_contents
) const override
;
30 void HidePopup() override
;
31 gfx::NativeView
GetPopupNativeView() override
;
32 ui::MenuModel
* GetContextMenu() override
;
33 bool CanDrag() const override
;
34 bool ExecuteAction(bool by_user
) override
;
35 void UpdateState() override
;
38 const std::string id_
;
39 const base::string16 name_
;
42 gfx::Image media_router_idle_icon_
;
44 ToolbarActionViewDelegate
* delegate_
;
46 DISALLOW_COPY_AND_ASSIGN(MediaRouterAction
);
49 #endif // CHROME_BROWSER_UI_TOOLBAR_MEDIA_ROUTER_ACTION_H_