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 78 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
89 virtual bool IsExtensionIncognitoEnabled( | 89 virtual bool IsExtensionIncognitoEnabled( |
90 const std::string& extension_id, | 90 const std::string& extension_id, |
91 content::BrowserContext* context) const = 0; | 91 content::BrowserContext* context) const = 0; |
92 | 92 |
93 // Returns true if |extension| can see events and data from another | 93 // Returns true if |extension| can see events and data from another |
94 // sub-profile (incognito to original profile, or vice versa). | 94 // sub-profile (incognito to original profile, or vice versa). |
95 virtual bool CanExtensionCrossIncognito( | 95 virtual bool CanExtensionCrossIncognito( |
96 const extensions::Extension* extension, | 96 const extensions::Extension* extension, |
97 content::BrowserContext* context) const = 0; | 97 content::BrowserContext* context) const = 0; |
98 | 98 |
99 // Returns true if |request| corresponds to a resource request from a | |
100 // <webview>. | |
101 virtual bool IsWebViewRequest(net::URLRequest* request) const = 0; | |
James Cook
2014/04/15 17:21:21
It's unfortunate that ExtensionsBrowserClient need
Yoyo Zhou
2014/04/15 21:40:06
I think it's okay to add this for now; when we mak
lazyboy
2014/04/15 22:17:03
Updated test_extensions_browser_client.h
| |
102 | |
99 // Returns an URLRequestJob to load an extension resource from the embedder's | 103 // Returns an URLRequestJob to load an extension resource from the embedder's |
100 // resource bundle (.pak) files. Returns NULL if the request is not for a | 104 // resource bundle (.pak) files. Returns NULL if the request is not for a |
101 // resource bundle resource or if the embedder does not support this feature. | 105 // resource bundle resource or if the embedder does not support this feature. |
102 // Used for component extensions. Called on the IO thread. | 106 // Used for component extensions. Called on the IO thread. |
103 virtual net::URLRequestJob* MaybeCreateResourceBundleRequestJob( | 107 virtual net::URLRequestJob* MaybeCreateResourceBundleRequestJob( |
104 net::URLRequest* request, | 108 net::URLRequest* request, |
105 net::NetworkDelegate* network_delegate, | 109 net::NetworkDelegate* network_delegate, |
106 const base::FilePath& directory_path, | 110 const base::FilePath& directory_path, |
107 const std::string& content_security_policy, | 111 const std::string& content_security_policy, |
108 bool send_cors_header) = 0; | 112 bool send_cors_header) = 0; |
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
165 // Returns the single instance of |this|. | 169 // Returns the single instance of |this|. |
166 static ExtensionsBrowserClient* Get(); | 170 static ExtensionsBrowserClient* Get(); |
167 | 171 |
168 // Initialize the single instance. | 172 // Initialize the single instance. |
169 static void Set(ExtensionsBrowserClient* client); | 173 static void Set(ExtensionsBrowserClient* client); |
170 }; | 174 }; |
171 | 175 |
172 } // namespace extensions | 176 } // namespace extensions |
173 | 177 |
174 #endif // EXTENSIONS_BROWSER_EXTENSIONS_BROWSER_CLIENT_H_ | 178 #endif // EXTENSIONS_BROWSER_EXTENSIONS_BROWSER_CLIENT_H_ |
OLD | NEW |