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

Unified Diff: chrome/renderer/extensions/extension_dispatcher.h

Issue 9903010: Extract ExtensionRequestSender from SchemaGeneratedBindings. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix bug Created 8 years, 9 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
« no previous file with comments | « chrome/renderer/extensions/event_bindings.cc ('k') | chrome/renderer/extensions/extension_dispatcher.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/renderer/extensions/extension_dispatcher.h
diff --git a/chrome/renderer/extensions/extension_dispatcher.h b/chrome/renderer/extensions/extension_dispatcher.h
index 5bcd04c421e266df0fecd0c118067533d98a6bd0..0b0eb2530bb64342809e50d43eb0ddfbbdb860d0 100644
--- a/chrome/renderer/extensions/extension_dispatcher.h
+++ b/chrome/renderer/extensions/extension_dispatcher.h
@@ -21,8 +21,9 @@
#include "chrome/renderer/resource_bundle_source_map.h"
#include "v8/include/v8.h"
-class ModuleSystem;
+class ExtensionRequestSender;
class GURL;
+class ModuleSystem;
class URLPattern;
class UserScriptSlave;
struct ExtensionMsg_Loaded_Params;
@@ -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,
@@ -227,6 +239,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);
};
« no previous file with comments | « chrome/renderer/extensions/event_bindings.cc ('k') | chrome/renderer/extensions/extension_dispatcher.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698