| 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 "apps/shell/browser/shell_extensions_browser_client.h" | 5 #include "apps/shell/browser/shell_extensions_browser_client.h" |
| 6 | 6 |
| 7 #include "apps/shell/browser/shell_app_sorting.h" | 7 #include "apps/shell/browser/shell_app_sorting.h" |
| 8 #include "apps/shell/browser/shell_app_window_api.h" | 8 #include "apps/shell/browser/shell_app_window_api.h" |
| 9 #include "apps/shell/browser/shell_extension_system_factory.h" | 9 #include "apps/shell/browser/shell_extension_system_factory.h" |
| 10 #include "apps/shell/browser/shell_extension_web_contents_observer.h" | 10 #include "apps/shell/browser/shell_extension_web_contents_observer.h" |
| (...skipping 132 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 143 content::BrowserContext* context) const { | 143 content::BrowserContext* context) const { |
| 144 return false; | 144 return false; |
| 145 } | 145 } |
| 146 | 146 |
| 147 bool ShellExtensionsBrowserClient::CanExtensionCrossIncognito( | 147 bool ShellExtensionsBrowserClient::CanExtensionCrossIncognito( |
| 148 const extensions::Extension* extension, | 148 const extensions::Extension* extension, |
| 149 content::BrowserContext* context) const { | 149 content::BrowserContext* context) const { |
| 150 return false; | 150 return false; |
| 151 } | 151 } |
| 152 | 152 |
| 153 net::URLRequestJob* |
| 154 ShellExtensionsBrowserClient::MaybeCreateResourceBundleRequestJob( |
| 155 net::URLRequest* request, |
| 156 net::NetworkDelegate* network_delegate, |
| 157 const base::FilePath& directory_path, |
| 158 const std::string& content_security_policy, |
| 159 bool send_cors_header) { |
| 160 return NULL; |
| 161 } |
| 162 |
| 163 bool ShellExtensionsBrowserClient::AllowCrossRendererResourceLoad( |
| 164 net::URLRequest* request, |
| 165 bool is_incognito, |
| 166 const Extension* extension, |
| 167 InfoMap* extension_info_map) { |
| 168 // Note: This may need to change if app_shell supports webview. |
| 169 return false; |
| 170 } |
| 171 |
| 153 PrefService* ShellExtensionsBrowserClient::GetPrefServiceForContext( | 172 PrefService* ShellExtensionsBrowserClient::GetPrefServiceForContext( |
| 154 BrowserContext* context) { | 173 BrowserContext* context) { |
| 155 return prefs_.get(); | 174 return prefs_.get(); |
| 156 } | 175 } |
| 157 | 176 |
| 158 void ShellExtensionsBrowserClient::GetEarlyExtensionPrefsObservers( | 177 void ShellExtensionsBrowserClient::GetEarlyExtensionPrefsObservers( |
| 159 content::BrowserContext* context, | 178 content::BrowserContext* context, |
| 160 std::vector<ExtensionPrefsObserver*>* observers) const {} | 179 std::vector<ExtensionPrefsObserver*>* observers) const {} |
| 161 | 180 |
| 162 bool ShellExtensionsBrowserClient::DeferLoadingBackgroundHosts( | 181 bool ShellExtensionsBrowserClient::DeferLoadingBackgroundHosts( |
| (...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 205 | 224 |
| 206 // TODO(rockot): Remove dependency on src/chrome once we have some core APIs | 225 // TODO(rockot): Remove dependency on src/chrome once we have some core APIs |
| 207 // moved out. Also clean up the comment below. See http://crbug.com/349042. | 226 // moved out. Also clean up the comment below. See http://crbug.com/349042. |
| 208 extensions::api::GeneratedFunctionRegistry::RegisterAll(registry); | 227 extensions::api::GeneratedFunctionRegistry::RegisterAll(registry); |
| 209 | 228 |
| 210 // Register our simplified implementation for chrome.app.window.create(). | 229 // Register our simplified implementation for chrome.app.window.create(). |
| 211 registry->RegisterFunction<ShellAppWindowCreateFunction>(); | 230 registry->RegisterFunction<ShellAppWindowCreateFunction>(); |
| 212 } | 231 } |
| 213 | 232 |
| 214 } // namespace extensions | 233 } // namespace extensions |
| OLD | NEW |