OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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_TOOLBAR_ACTION_VIEW_CONTROLLER_H_ | 5 #ifndef CHROME_BROWSER_UI_TOOLBAR_TOOLBAR_ACTION_VIEW_CONTROLLER_H_ |
6 #define CHROME_BROWSER_UI_TOOLBAR_TOOLBAR_ACTION_VIEW_CONTROLLER_H_ | 6 #define CHROME_BROWSER_UI_TOOLBAR_TOOLBAR_ACTION_VIEW_CONTROLLER_H_ |
7 | 7 |
8 #include "base/strings/string16.h" | 8 #include "base/strings/string16.h" |
9 #include "ui/gfx/image/image.h" | 9 #include "ui/gfx/image/image.h" |
10 | 10 |
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
61 // Returns true if the action wants to run, and should be popped out of the | 61 // Returns true if the action wants to run, and should be popped out of the |
62 // overflow menu on the given |web_contents|. | 62 // overflow menu on the given |web_contents|. |
63 virtual bool WantsToRun(content::WebContents* web_contents) const = 0; | 63 virtual bool WantsToRun(content::WebContents* web_contents) const = 0; |
64 | 64 |
65 // Returns true if the action has a popup for the given |web_contents|. | 65 // Returns true if the action has a popup for the given |web_contents|. |
66 virtual bool HasPopup(content::WebContents* web_contents) const = 0; | 66 virtual bool HasPopup(content::WebContents* web_contents) const = 0; |
67 | 67 |
68 // Hides the current popup, if one is visible. | 68 // Hides the current popup, if one is visible. |
69 virtual void HidePopup() = 0; | 69 virtual void HidePopup() = 0; |
70 | 70 |
| 71 // Hides the current sidebar, if one is visible. |
| 72 virtual void HideSidebar() {} |
| 73 |
71 // Returns the native view for the popup, if one is active. | 74 // Returns the native view for the popup, if one is active. |
72 virtual gfx::NativeView GetPopupNativeView() = 0; | 75 virtual gfx::NativeView GetPopupNativeView() = 0; |
73 | 76 |
74 // Returns the context menu model, or null if no context menu should be shown. | 77 // Returns the context menu model, or null if no context menu should be shown. |
75 virtual ui::MenuModel* GetContextMenu() = 0; | 78 virtual ui::MenuModel* GetContextMenu() = 0; |
76 | 79 |
77 // Called when a context menu has closed so the controller can perform any | 80 // Called when a context menu has closed so the controller can perform any |
78 // necessary cleanup. | 81 // necessary cleanup. |
79 virtual void OnContextMenuClosed() {} | 82 virtual void OnContextMenuClosed() {} |
80 | 83 |
(...skipping 18 matching lines...) Expand all Loading... |
99 content::WebContents* web_contents) const { | 102 content::WebContents* web_contents) const { |
100 } | 103 } |
101 | 104 |
102 // Registers an accelerator. Called when the view is added to the hierarchy. | 105 // Registers an accelerator. Called when the view is added to the hierarchy. |
103 // Unregistering any commands is the responsibility of the controller. | 106 // Unregistering any commands is the responsibility of the controller. |
104 virtual void RegisterCommand() { | 107 virtual void RegisterCommand() { |
105 } | 108 } |
106 }; | 109 }; |
107 | 110 |
108 #endif // CHROME_BROWSER_UI_TOOLBAR_TOOLBAR_ACTION_VIEW_CONTROLLER_H_ | 111 #endif // CHROME_BROWSER_UI_TOOLBAR_TOOLBAR_ACTION_VIEW_CONTROLLER_H_ |
OLD | NEW |