| 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 #include "chrome/browser/extensions/chrome_extensions_browser_client.h" | 5 #include "chrome/browser/extensions/chrome_extensions_browser_client.h" |
| 6 | 6 |
| 7 #include "apps/common/api/generated_api.h" | 7 #include "apps/common/api/generated_api.h" |
| 8 #include "base/command_line.h" | 8 #include "base/command_line.h" |
| 9 #include "base/version.h" | 9 #include "base/version.h" |
| 10 #include "chrome/browser/app_mode/app_mode_utils.h" | 10 #include "chrome/browser/app_mode/app_mode_utils.h" |
| (...skipping 95 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 106 || util::IsIncognitoEnabled(extension_id, context); | 106 || util::IsIncognitoEnabled(extension_id, context); |
| 107 } | 107 } |
| 108 | 108 |
| 109 bool ChromeExtensionsBrowserClient::CanExtensionCrossIncognito( | 109 bool ChromeExtensionsBrowserClient::CanExtensionCrossIncognito( |
| 110 const extensions::Extension* extension, | 110 const extensions::Extension* extension, |
| 111 content::BrowserContext* context) const { | 111 content::BrowserContext* context) const { |
| 112 return IsGuestSession(context) | 112 return IsGuestSession(context) |
| 113 || util::CanCrossIncognito(extension, context); | 113 || util::CanCrossIncognito(extension, context); |
| 114 } | 114 } |
| 115 | 115 |
| 116 bool ChromeExtensionsBrowserClient::IsWebViewRequest( |
| 117 net::URLRequest* request) const { |
| 118 return url_request_util::IsWebViewRequest(request); |
| 119 } |
| 120 |
| 116 net::URLRequestJob* | 121 net::URLRequestJob* |
| 117 ChromeExtensionsBrowserClient::MaybeCreateResourceBundleRequestJob( | 122 ChromeExtensionsBrowserClient::MaybeCreateResourceBundleRequestJob( |
| 118 net::URLRequest* request, | 123 net::URLRequest* request, |
| 119 net::NetworkDelegate* network_delegate, | 124 net::NetworkDelegate* network_delegate, |
| 120 const base::FilePath& directory_path, | 125 const base::FilePath& directory_path, |
| 121 const std::string& content_security_policy, | 126 const std::string& content_security_policy, |
| 122 bool send_cors_header) { | 127 bool send_cors_header) { |
| 123 return url_request_util::MaybeCreateURLRequestResourceBundleJob( | 128 return url_request_util::MaybeCreateURLRequestResourceBundleJob( |
| 124 request, | 129 request, |
| 125 network_delegate, | 130 network_delegate, |
| (...skipping 132 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 258 // Generated APIs from lower-level modules. | 263 // Generated APIs from lower-level modules. |
| 259 extensions::core_api::GeneratedFunctionRegistry::RegisterAll(registry); | 264 extensions::core_api::GeneratedFunctionRegistry::RegisterAll(registry); |
| 260 apps::api::GeneratedFunctionRegistry::RegisterAll(registry); | 265 apps::api::GeneratedFunctionRegistry::RegisterAll(registry); |
| 261 | 266 |
| 262 // Generated APIs from Chrome. | 267 // Generated APIs from Chrome. |
| 263 extensions::api::GeneratedFunctionRegistry::RegisterAll(registry); | 268 extensions::api::GeneratedFunctionRegistry::RegisterAll(registry); |
| 264 #endif | 269 #endif |
| 265 } | 270 } |
| 266 | 271 |
| 267 } // namespace extensions | 272 } // namespace extensions |
| OLD | NEW |