OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #ifndef EXTENSIONS_BROWSER_EXTENSIONS_BROWSER_CLIENT_H_ | 5 #ifndef EXTENSIONS_BROWSER_EXTENSIONS_BROWSER_CLIENT_H_ |
6 #define EXTENSIONS_BROWSER_EXTENSIONS_BROWSER_CLIENT_H_ | 6 #define EXTENSIONS_BROWSER_EXTENSIONS_BROWSER_CLIENT_H_ |
7 | 7 |
8 #include <string> | 8 #include <string> |
9 #include <vector> | 9 #include <vector> |
10 | 10 |
(...skipping 83 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
94 virtual bool IsExtensionIncognitoEnabled( | 94 virtual bool IsExtensionIncognitoEnabled( |
95 const std::string& extension_id, | 95 const std::string& extension_id, |
96 content::BrowserContext* context) const = 0; | 96 content::BrowserContext* context) const = 0; |
97 | 97 |
98 // Returns true if |extension| can see events and data from another | 98 // Returns true if |extension| can see events and data from another |
99 // sub-profile (incognito to original profile, or vice versa). | 99 // sub-profile (incognito to original profile, or vice versa). |
100 virtual bool CanExtensionCrossIncognito( | 100 virtual bool CanExtensionCrossIncognito( |
101 const extensions::Extension* extension, | 101 const extensions::Extension* extension, |
102 content::BrowserContext* context) const = 0; | 102 content::BrowserContext* context) const = 0; |
103 | 103 |
104 // Returns true if |request| corresponds to a resource request from a | |
105 // <webview>. | |
106 virtual bool IsWebViewRequest(net::URLRequest* request) const = 0; | |
107 | |
108 // Returns an URLRequestJob to load an extension resource from the embedder's | 104 // Returns an URLRequestJob to load an extension resource from the embedder's |
109 // resource bundle (.pak) files. Returns NULL if the request is not for a | 105 // resource bundle (.pak) files. Returns NULL if the request is not for a |
110 // resource bundle resource or if the embedder does not support this feature. | 106 // resource bundle resource or if the embedder does not support this feature. |
111 // Used for component extensions. Called on the IO thread. | 107 // Used for component extensions. Called on the IO thread. |
112 virtual net::URLRequestJob* MaybeCreateResourceBundleRequestJob( | 108 virtual net::URLRequestJob* MaybeCreateResourceBundleRequestJob( |
113 net::URLRequest* request, | 109 net::URLRequest* request, |
114 net::NetworkDelegate* network_delegate, | 110 net::NetworkDelegate* network_delegate, |
115 const base::FilePath& directory_path, | 111 const base::FilePath& directory_path, |
116 const std::string& content_security_policy, | 112 const std::string& content_security_policy, |
117 bool send_cors_header) = 0; | 113 bool send_cors_header) = 0; |
(...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
194 // Returns the single instance of |this|. | 190 // Returns the single instance of |this|. |
195 static ExtensionsBrowserClient* Get(); | 191 static ExtensionsBrowserClient* Get(); |
196 | 192 |
197 // Initialize the single instance. | 193 // Initialize the single instance. |
198 static void Set(ExtensionsBrowserClient* client); | 194 static void Set(ExtensionsBrowserClient* client); |
199 }; | 195 }; |
200 | 196 |
201 } // namespace extensions | 197 } // namespace extensions |
202 | 198 |
203 #endif // EXTENSIONS_BROWSER_EXTENSIONS_BROWSER_CLIENT_H_ | 199 #endif // EXTENSIONS_BROWSER_EXTENSIONS_BROWSER_CLIENT_H_ |
OLD | NEW |