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

Unified Diff: chrome/browser/ui/extensions/extension_action_platform_delegate.h

Issue 869873008: [Extensions Toolbar] Move some popup logic to be platform-agnostic (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Avi's Created 5 years, 11 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/ui/extensions/extension_action_platform_delegate.h
diff --git a/chrome/browser/ui/extensions/extension_action_platform_delegate.h b/chrome/browser/ui/extensions/extension_action_platform_delegate.h
index 19618e348d3f45bcdf7a6dbe1df0d4642abca629..48f4536abbf43c1ec2d1e1f2f183bb81cfbe51b1 100644
--- a/chrome/browser/ui/extensions/extension_action_platform_delegate.h
+++ b/chrome/browser/ui/extensions/extension_action_platform_delegate.h
@@ -9,6 +9,10 @@
class GURL;
+namespace extensions {
+class ExtensionViewHost;
+}
+
class ExtensionActionPlatformDelegate {
public:
virtual ~ExtensionActionPlatformDelegate() {}
@@ -27,9 +31,6 @@ class ExtensionActionPlatformDelegate {
// Called once the delegate is set, in order to do any extra initialization.
virtual void OnDelegateSet() = 0;
- // Returns true if there is currently a popup for this extension action.
- virtual bool IsShowingPopup() const = 0;
-
// Closes the active popup (whether it was this action's popup or not).
virtual void CloseActivePopup() = 0;
@@ -41,8 +42,9 @@ class ExtensionActionPlatformDelegate {
// |grant_tab_permissions| is true if active tab permissions should be given
// to the extension; this is only true if the popup is opened through a user
// action.
- // Returns true if a popup is successfully shown.
- virtual bool ShowPopupWithUrl(
+ // Returns the ExtensionViewHost of the created popup, if a popup is
+ // successfully shown.
+ virtual extensions::ExtensionViewHost* ShowPopupWithUrl(
ExtensionActionViewController::PopupShowAction show_action,
const GURL& popup_url,
bool grant_tab_permissions) = 0;

Powered by Google App Engine
This is Rietveld 408576698