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

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

Issue 1168383002: Implement sidebar support for extension action popups Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix assertion failure at extension_view_host.cc Created 5 years, 2 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 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 47 matching lines...) Expand 10 before | Expand all | Expand 10 after
58 // Returns true if the action wants to run, and should be popped out of the 58 // Returns true if the action wants to run, and should be popped out of the
59 // overflow menu on the given |web_contents|. 59 // overflow menu on the given |web_contents|.
60 virtual bool WantsToRun(content::WebContents* web_contents) const = 0; 60 virtual bool WantsToRun(content::WebContents* web_contents) const = 0;
61 61
62 // Returns true if the action has a popup for the given |web_contents|. 62 // Returns true if the action has a popup for the given |web_contents|.
63 virtual bool HasPopup(content::WebContents* web_contents) const = 0; 63 virtual bool HasPopup(content::WebContents* web_contents) const = 0;
64 64
65 // Hides the current popup, if one is visible. 65 // Hides the current popup, if one is visible.
66 virtual void HidePopup() = 0; 66 virtual void HidePopup() = 0;
67 67
68 // Hides the current sidebar, if one is visible.
69 virtual void HideSidebar() {}
70
68 // Returns the native view for the popup, if one is active. 71 // Returns the native view for the popup, if one is active.
69 virtual gfx::NativeView GetPopupNativeView() = 0; 72 virtual gfx::NativeView GetPopupNativeView() = 0;
70 73
71 // Returns the context menu model, or null if no context menu should be shown. 74 // Returns the context menu model, or null if no context menu should be shown.
72 virtual ui::MenuModel* GetContextMenu() = 0; 75 virtual ui::MenuModel* GetContextMenu() = 0;
73 76
74 // Called when a context menu has closed so the controller can perform any 77 // Called when a context menu has closed so the controller can perform any
75 // necessary cleanup. 78 // necessary cleanup.
76 virtual void OnContextMenuClosed() {} 79 virtual void OnContextMenuClosed() {}
77 80
(...skipping 10 matching lines...) Expand all
88 // context menu. 91 // context menu.
89 virtual bool DisabledClickOpensMenu() const = 0; 92 virtual bool DisabledClickOpensMenu() const = 0;
90 93
91 // Registers an accelerator. Called when the view is added to the hierarchy. 94 // Registers an accelerator. Called when the view is added to the hierarchy.
92 // Unregistering any commands is the responsibility of the controller. 95 // Unregistering any commands is the responsibility of the controller.
93 virtual void RegisterCommand() { 96 virtual void RegisterCommand() {
94 } 97 }
95 }; 98 };
96 99
97 #endif // CHROME_BROWSER_UI_TOOLBAR_TOOLBAR_ACTION_VIEW_CONTROLLER_H_ 100 #endif // CHROME_BROWSER_UI_TOOLBAR_TOOLBAR_ACTION_VIEW_CONTROLLER_H_
OLDNEW
« no previous file with comments | « chrome/browser/ui/extensions/extension_action_view_controller.cc ('k') | chrome/browser/ui/toolbar/toolbar_actions_bar.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698