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

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

Issue 6894045: wip (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 9 years, 8 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 8b46396f92cc89c011e51c6e8b381caaffec6e65..9834759ca52307d79ff41bda2b69f080e8b2d9fd 100644
--- a/chrome/renderer/extensions/extension_dispatcher.h
+++ b/chrome/renderer/extensions/extension_dispatcher.h
@@ -37,10 +37,21 @@ class ExtensionDispatcher : public RenderProcessObserver {
ExtensionDispatcher();
virtual ~ExtensionDispatcher();
+ const std::set<std::string>& function_names() const {
+ return function_names_;
+ }
+
+ typedef std::map< std::string, std::vector<std::string> > PageActionIdMap;
+ const PageActionIdMap& page_action_map() const {
+ return page_action_ids_;
+ }
+
bool is_extension_process() const { return is_extension_process_; }
const ExtensionSet* extensions() const { return &extensions_; }
UserScriptSlave* user_script_slave() { return user_script_slave_.get(); }
+ bool IsExtensionActive(const std::string& extension_id);
+
private:
friend class RenderViewTest;
@@ -63,10 +74,7 @@ class ExtensionDispatcher : public RenderProcessObserver {
const Extension::ScriptingWhitelist& extension_ids);
void OnPageActionsUpdated(const std::string& extension_id,
const std::vector<std::string>& page_actions);
- void OnSetAPIPermissions(const std::string& extension_id,
- const std::set<std::string>& permissions);
- void OnSetHostPermissions(const GURL& extension_url,
- const std::vector<URLPattern>& permissions);
+ void OnActivateExtension(const std::string& extension_id);
void OnUpdateUserScripts(base::SharedMemoryHandle table);
// Update the list of active extensions that will be reported when we crash.
@@ -76,6 +84,10 @@ class ExtensionDispatcher : public RenderProcessObserver {
// extension is for Chrome Extensions only.
void RegisterExtension(v8::Extension* extension, bool restrict_to_extensions);
+ // Sets the host permissions for a particular extension.
+ void SetHostPermissions(const GURL& extension_url,
+ const std::vector<URLPattern>& permissions);
+
// True if this renderer is running extensions.
bool is_extension_process_;
@@ -93,6 +105,15 @@ class ExtensionDispatcher : public RenderProcessObserver {
// The v8 extensions which are restricted to extension-related contexts.
std::set<std::string> restricted_v8_extensions_;
+ // All declared function names from extension_api.json.
+ std::set<std::string> function_names_;
+
+ // A map of extension ID to vector of page action ids.
+ PageActionIdMap page_action_ids_;
+
+ // The extensions that are active in this process.
+ std::set<std::string> active_extension_ids_;
+
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