summaryrefslogtreecommitdiffstats
path: root/extensions/browser/extensions_browser_client.h
diff options
context:
space:
mode:
Diffstat (limited to 'extensions/browser/extensions_browser_client.h')
-rw-r--r--extensions/browser/extensions_browser_client.h28
1 files changed, 28 insertions, 0 deletions
diff --git a/extensions/browser/extensions_browser_client.h b/extensions/browser/extensions_browser_client.h
index c7542a7..d7c02d9 100644
--- a/extensions/browser/extensions_browser_client.h
+++ b/extensions/browser/extensions_browser_client.h
@@ -16,6 +16,7 @@ class PrefService;
namespace base {
class CommandLine;
+class FilePath;
}
namespace content {
@@ -23,6 +24,12 @@ class BrowserContext;
class WebContents;
}
+namespace net {
+class NetworkDelegate;
+class URLRequest;
+class URLRequestJob;
+}
+
namespace extensions {
class ApiActivityMonitor;
@@ -32,6 +39,7 @@ class ExtensionHostDelegate;
class ExtensionPrefsObserver;
class ExtensionSystem;
class ExtensionSystemProvider;
+class InfoMap;
// Interface to allow the extensions module to make browser-process-specific
// queries of the embedder. Should be Set() once in the browser process.
@@ -88,6 +96,26 @@ class ExtensionsBrowserClient {
const extensions::Extension* extension,
content::BrowserContext* context) const = 0;
+ // Returns an URLRequestJob to load an extension resource from the embedder's
+ // resource bundle (.pak) files. Returns NULL if the request is not for a
+ // resource bundle resource or if the embedder does not support this feature.
+ // Used for component extensions. Called on the IO thread.
+ virtual net::URLRequestJob* MaybeCreateResourceBundleRequestJob(
+ net::URLRequest* request,
+ net::NetworkDelegate* network_delegate,
+ const base::FilePath& directory_path,
+ const std::string& content_security_policy,
+ bool send_cors_header) = 0;
+
+ // Returns true if the embedder wants to allow a chrome-extension:// resource
+ // request coming from renderer A to access a resource in an extension running
+ // in renderer B. For example, Chrome overrides this to provide support for
+ // webview and dev tools. Called on the IO thread.
+ virtual bool AllowCrossRendererResourceLoad(net::URLRequest* request,
+ bool is_incognito,
+ const Extension* extension,
+ InfoMap* extension_info_map) = 0;
+
// Returns the PrefService associated with |context|.
virtual PrefService* GetPrefServiceForContext(
content::BrowserContext* context) = 0;