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

Unified Diff: chrome/browser/extensions/extension_function_dispatcher.h

Issue 385061: experimental.popup support for tab-content-viewed extensions (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 11 years, 1 month 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/extensions/extension_function_dispatcher.h
===================================================================
--- chrome/browser/extensions/extension_function_dispatcher.h (revision 31907)
+++ chrome/browser/extensions/extension_function_dispatcher.h (working copy)
@@ -14,8 +14,10 @@
class Browser;
class Extension;
+class ExtensionDOMUI;
class ExtensionFunction;
class ExtensionHost;
+class ExtensionPopupHost;
class Profile;
class RenderViewHost;
class RenderViewHostDelegate;
@@ -33,19 +35,21 @@
public:
virtual Browser* GetBrowser() = 0;
virtual ExtensionHost* GetExtensionHost() { return NULL; }
+ virtual ExtensionDOMUI* GetExtensionDOMUI() { return NULL; }
};
// The peer object allows us to notify ExtensionFunctions when we are
// destroyed.
// TODO: this should use WeakPtr
struct Peer : public base::RefCounted<Peer> {
- Peer(ExtensionFunctionDispatcher* dispatcher) : dispatcher_(dispatcher) {}
+ explicit Peer(ExtensionFunctionDispatcher* dispatcher)
+ : dispatcher_(dispatcher) {}
ExtensionFunctionDispatcher* dispatcher_;
- private:
- friend class base::RefCounted<Peer>;
+ private:
+ friend class base::RefCounted<Peer>;
- ~Peer() {}
+ ~Peer() {}
};
// Gets a list of all known extension function names.
@@ -78,10 +82,18 @@
// example, for positioning windows, or alert boxes, or creating tabs.
Browser* GetBrowser();
+ // Get the extension popup hosting environment for the ExtensionHost
+ // or ExtensionDOMUI associted with this dispatcher.
+ ExtensionPopupHost* GetPopupHost();
+
// Gets the ExtensionHost associated with this object. In the case of
// tab hosted extension pages, this will return NULL.
ExtensionHost* GetExtensionHost();
+ // Gets the ExtensionDOMUI associated with this object. In the case of
+ // non-tab-hosted extension pages, this will return NULL.
+ ExtensionDOMUI* GetExtensionDOMUI();
+
// Gets the extension the function is being invoked by. This should not ever
// return NULL.
Extension* GetExtension();
« no previous file with comments | « chrome/browser/extensions/extension_dom_ui.cc ('k') | chrome/browser/extensions/extension_function_dispatcher.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698