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

Unified Diff: extensions/browser/extension_function_dispatcher.h

Issue 1169223002: [Extensions] Clean up the handling of ExtensionHostMsg_Request (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Latest master Created 5 years, 6 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: extensions/browser/extension_function_dispatcher.h
diff --git a/extensions/browser/extension_function_dispatcher.h b/extensions/browser/extension_function_dispatcher.h
index 9224bbde5134518e72365f597c900e8b0ec094c1..70037ac4bd612b09e6d6445a0f7bdf23b9f4f72b 100644
--- a/extensions/browser/extension_function_dispatcher.h
+++ b/extensions/browser/extension_function_dispatcher.h
@@ -90,16 +90,11 @@ class ExtensionFunctionDispatcher
const ExtensionHostMsg_Request_Params& params);
// Public constructor. Callers must ensure that:
- // - |delegate| outlives this object.
// - This object outlives any RenderViewHost's passed to created
// ExtensionFunctions.
- ExtensionFunctionDispatcher(content::BrowserContext* browser_context,
- Delegate* delegate);
-
+ ExtensionFunctionDispatcher(content::BrowserContext* browser_context);
not at google - send to devlin 2015/06/10 18:37:49 explicit
Devlin 2015/06/10 20:59:20 Done.
~ExtensionFunctionDispatcher();
- Delegate* delegate() { return delegate_; }
-
// Message handlers.
// The response is sent to the corresponding render view in an
// ExtensionMsg_Response message.
@@ -111,9 +106,18 @@ class ExtensionFunctionDispatcher
// a response (if any) to the extension.
void OnExtensionFunctionCompleted(const Extension* extension);
+ // See the Delegate class for documentation on these methods.
+ // TODO(devlin): None of these belong here. We should kill
+ // ExtensionFunctionDispatcher::Delegate.
+ WindowController* GetExtensionWindowController() const;
+ content::WebContents* GetAssociatedWebContents() const;
+ content::WebContents* GetVisibleWebContents() const;
+
// The BrowserContext that this dispatcher is associated with.
content::BrowserContext* browser_context() { return browser_context_; }
+ void set_delegate(Delegate* delegate) { delegate_ = delegate; }
+
private:
// For a given RenderViewHost instance, UIThreadResponseCallbackWrapper
// creates ExtensionFunction::ResponseCallback instances which send responses

Powered by Google App Engine
This is Rietveld 408576698