| Index: chrome/renderer/extensions/extension_dispatcher.h
|
| diff --git a/chrome/renderer/extensions/extension_dispatcher.h b/chrome/renderer/extensions/extension_dispatcher.h
|
| index c64cd733719c263f604e327da49370b48beabc95..998342dbab59e9fc2fc35b6b0d64acbe03950453 100644
|
| --- a/chrome/renderer/extensions/extension_dispatcher.h
|
| +++ b/chrome/renderer/extensions/extension_dispatcher.h
|
| @@ -14,6 +14,8 @@
|
| #include "base/timer.h"
|
| #include "content/public/renderer/render_process_observer.h"
|
| #include "chrome/common/extensions/extension_set.h"
|
| +#include "chrome/common/extensions/feature.h"
|
| +#include "chrome/renderer/extensions/chrome_v8_context.h"
|
| #include "chrome/renderer/extensions/chrome_v8_context_set.h"
|
| #include "chrome/renderer/resource_bundle_source_map.h"
|
| #include "v8/include/v8.h"
|
| @@ -54,13 +56,11 @@ class ExtensionDispatcher : public content::RenderProcessObserver {
|
| }
|
| UserScriptSlave* user_script_slave() { return user_script_slave_.get(); }
|
|
|
| - bool IsApplicationActive(const std::string& extension_id) const;
|
| bool IsExtensionActive(const std::string& extension_id) const;
|
|
|
| - // Whether or not we should set up custom bindings for this api.
|
| - bool AllowCustomAPI(WebKit::WebFrame* frame,
|
| - const std::string& custom_binding_api_name,
|
| - int world_id);
|
| + // Finds the extension ID for the current context. This is determined from
|
| + // |world_id| if it's non-zero, or the URL in |frame| if it is.
|
| + std::string GetExtensionID(WebKit::WebFrame* frame, int world_id);
|
|
|
| // See WebKit::WebPermissionClient::allowScriptExtension
|
| // TODO(koz): Remove once WebKit no longer calls this.
|
| @@ -117,7 +117,6 @@ class ExtensionDispatcher : public content::RenderProcessObserver {
|
| const Extension::ScriptingWhitelist& extension_ids);
|
| void OnPageActionsUpdated(const std::string& extension_id,
|
| const std::vector<std::string>& page_actions);
|
| - void OnActivateApplication(const std::string& extension_id);
|
| void OnActivateExtension(const std::string& extension_id);
|
| void OnUpdatePermissions(int reason_id,
|
| const std::string& extension_id,
|
| @@ -145,15 +144,17 @@ class ExtensionDispatcher : public content::RenderProcessObserver {
|
| const URLPatternSet& origins);
|
|
|
| void RegisterNativeHandlers(ModuleSystem* module_system,
|
| - ChromeV8Context* context,
|
| - bool is_bindings_allowed);
|
| + ChromeV8Context* context);
|
|
|
| // Inserts static source code into |source_map_|.
|
| void PopulateSourceMap();
|
|
|
| - // Finds the extension ID for the current context. This is determined from
|
| - // |world_id| if it's non-zero, or the URL in |frame| if it is.
|
| - std::string GetExtensionID(WebKit::WebFrame* frame, int world_id);
|
| + // Returns the type of context that should be created, given an extension ID
|
| + // (if any), extension group (if any), and URL info (if any).
|
| + extensions::Feature::Context ClassifyJavaScriptContext(
|
| + const std::string& extension_id,
|
| + int extension_group,
|
| + const ExtensionURLInfo& url_info);
|
|
|
| // True if this renderer is running extensions.
|
| bool is_extension_process_;
|
| @@ -179,12 +180,9 @@ class ExtensionDispatcher : public content::RenderProcessObserver {
|
| // All declared function names.
|
| std::set<std::string> function_names_;
|
|
|
| - // The extensions that are active in this process.
|
| + // The extensions and apps that are active in this process.
|
| std::set<std::string> active_extension_ids_;
|
|
|
| - // The applications that are active in this process.
|
| - std::set<std::string> active_application_ids_;
|
| -
|
| // True once WebKit has been initialized (and it is therefore safe to poke).
|
| bool is_webkit_initialized_;
|
|
|
|
|