| Index: extensions/renderer/dispatcher.h
|
| diff --git a/extensions/renderer/dispatcher.h b/extensions/renderer/dispatcher.h
|
| index c71cb64757bd3b6c12b13358ac0cd834f195b665..c5ac3651f0b335faa177414e2f9fa727a7778bc0 100644
|
| --- a/extensions/renderer/dispatcher.h
|
| +++ b/extensions/renderer/dispatcher.h
|
| @@ -11,12 +11,10 @@
|
| #include <utility>
|
| #include <vector>
|
|
|
| -#include "base/memory/scoped_ptr.h"
|
| #include "base/scoped_observer.h"
|
| #include "base/timer/timer.h"
|
| #include "content/public/renderer/render_process_observer.h"
|
| #include "extensions/common/event_filter.h"
|
| -#include "extensions/common/extension.h"
|
| #include "extensions/common/extension_set.h"
|
| #include "extensions/common/extensions_client.h"
|
| #include "extensions/common/features/feature.h"
|
| @@ -55,6 +53,7 @@
|
| namespace extensions {
|
| class ContentWatcher;
|
| class DispatcherDelegate;
|
| +class Extension;
|
| class FilteredEventRouter;
|
| class ManifestPermissionSet;
|
| class RequestSender;
|
| @@ -77,7 +76,7 @@
|
| const ExtensionSet* extensions() const { return &extensions_; }
|
|
|
| const ScriptContextSet& script_context_set() const {
|
| - return *script_context_set_;
|
| + return script_context_set_;
|
| }
|
|
|
| V8SchemaRegistry* v8_schema_registry() { return v8_schema_registry_.get(); }
|
| @@ -89,6 +88,14 @@
|
| void OnRenderViewCreated(content::RenderView* render_view);
|
|
|
| bool IsExtensionActive(const std::string& extension_id) const;
|
| +
|
| + // Finds the extension for the JavaScript context associated with the
|
| + // specified |frame| and isolated world. If |world_id| is zero, finds the
|
| + // extension ID associated with the main world's JavaScript context. If the
|
| + // JavaScript context isn't from an extension, returns empty string.
|
| + const Extension* GetExtensionFromFrameAndWorld(const blink::WebFrame* frame,
|
| + int world_id,
|
| + bool use_effective_url);
|
|
|
| void DidCreateScriptContext(blink::WebLocalFrame* frame,
|
| const v8::Handle<v8::Context>& context,
|
| @@ -235,6 +242,15 @@
|
| // Returns whether the current renderer hosts a platform app.
|
| bool IsWithinPlatformApp();
|
|
|
| + bool IsSandboxedPage(const GURL& url) const;
|
| +
|
| + // Returns the Feature::Context type of context for a JavaScript context.
|
| + Feature::Context ClassifyJavaScriptContext(
|
| + const Extension* extension,
|
| + int extension_group,
|
| + const GURL& url,
|
| + const blink::WebSecurityOrigin& origin);
|
| +
|
| // Gets |field| from |object| or creates it as an empty object if it doesn't
|
| // exist.
|
| v8::Handle<v8::Object> GetOrCreateObject(const v8::Handle<v8::Object>& object,
|
| @@ -268,7 +284,7 @@
|
|
|
| // All the bindings contexts that are currently loaded for this renderer.
|
| // There is zero or one for each v8 context.
|
| - scoped_ptr<ScriptContextSet> script_context_set_;
|
| + ScriptContextSet script_context_set_;
|
|
|
| scoped_ptr<ContentWatcher> content_watcher_;
|
|
|
| @@ -284,7 +300,7 @@
|
| std::set<std::string> function_names_;
|
|
|
| // The extensions and apps that are active in this process.
|
| - ExtensionIdSet active_extension_ids_;
|
| + std::set<std::string> active_extension_ids_;
|
|
|
| ResourceBundleSourceMap source_map_;
|
|
|
|
|