Index: chrome/renderer/extensions/extension_dispatcher.h |
diff --git a/chrome/renderer/extensions/extension_dispatcher.h b/chrome/renderer/extensions/extension_dispatcher.h |
index 9f24aa4a246c29d07d4646c5be8afb1695d8e425..74d575412c0f84b161c11b876d1dcb7430663eef 100644 |
--- a/chrome/renderer/extensions/extension_dispatcher.h |
+++ b/chrome/renderer/extensions/extension_dispatcher.h |
@@ -25,6 +25,7 @@ class ModuleSystem; |
class GURL; |
class URLPattern; |
class UserScriptSlave; |
+class ExtensionRequestSender; |
struct ExtensionMsg_Loaded_Params; |
namespace WebKit { |
@@ -102,6 +103,17 @@ class ExtensionDispatcher : public content::RenderProcessObserver { |
return webrequest_other_; |
} |
+ void OnExtensionResponse(int request_id, |
+ bool success, |
+ const std::string& response, |
+ const std::string& error); |
+ |
+ // Checks that the current context contains an extension that has permission |
+ // to execute the specified function. If it does not, a v8 exception is thrown |
+ // and the method returns false. Otherwise returns true. |
+ bool CheckCurrentContextAccessToExtensionAPI( |
+ const std::string& function_name) const; |
+ |
private: |
friend class RenderViewTest; |
typedef void (*BindingInstaller)(ModuleSystem* module_system, |
@@ -220,6 +232,9 @@ class ExtensionDispatcher : public content::RenderProcessObserver { |
// them. |
std::map<std::string, BindingInstaller> lazy_bindings_map_; |
+ // Sends API requests to the extension host. |
+ scoped_ptr<ExtensionRequestSender> request_sender_; |
+ |
DISALLOW_COPY_AND_ASSIGN(ExtensionDispatcher); |
}; |