| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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/chrome_content_browser_client.h" | 5 #include "chrome/browser/chrome_content_browser_client.h" |
| 6 | 6 |
| 7 #include <set> | 7 #include <set> |
| 8 #include <utility> | 8 #include <utility> |
| 9 #include <vector> | 9 #include <vector> |
| 10 | 10 |
| (...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 59 #include "chrome/browser/profiles/profile.h" | 59 #include "chrome/browser/profiles/profile.h" |
| 60 #include "chrome/browser/profiles/profile_io_data.h" | 60 #include "chrome/browser/profiles/profile_io_data.h" |
| 61 #include "chrome/browser/renderer_host/chrome_render_message_filter.h" | 61 #include "chrome/browser/renderer_host/chrome_render_message_filter.h" |
| 62 #include "chrome/browser/renderer_host/pepper/chrome_browser_pepper_host_factory
.h" | 62 #include "chrome/browser/renderer_host/pepper/chrome_browser_pepper_host_factory
.h" |
| 63 #include "chrome/browser/search/instant_service.h" | 63 #include "chrome/browser/search/instant_service.h" |
| 64 #include "chrome/browser/search/instant_service_factory.h" | 64 #include "chrome/browser/search/instant_service_factory.h" |
| 65 #include "chrome/browser/search/search.h" | 65 #include "chrome/browser/search/search.h" |
| 66 #include "chrome/browser/search_engines/search_provider_install_state_message_fi
lter.h" | 66 #include "chrome/browser/search_engines/search_provider_install_state_message_fi
lter.h" |
| 67 #include "chrome/browser/signin/principals_message_filter.h" | 67 #include "chrome/browser/signin/principals_message_filter.h" |
| 68 #include "chrome/browser/speech/chrome_speech_recognition_manager_delegate.h" | 68 #include "chrome/browser/speech/chrome_speech_recognition_manager_delegate.h" |
| 69 #include "chrome/browser/speech/extension_api/tts_engine_extension_api.h" | |
| 70 #include "chrome/browser/speech/tts_controller.h" | 69 #include "chrome/browser/speech/tts_controller.h" |
| 71 #include "chrome/browser/speech/tts_message_filter.h" | 70 #include "chrome/browser/speech/tts_message_filter.h" |
| 72 #include "chrome/browser/ssl/ssl_add_certificate.h" | 71 #include "chrome/browser/ssl/ssl_add_certificate.h" |
| 73 #include "chrome/browser/ssl/ssl_blocking_page.h" | 72 #include "chrome/browser/ssl/ssl_blocking_page.h" |
| 74 #include "chrome/browser/ssl/ssl_client_certificate_selector.h" | 73 #include "chrome/browser/ssl/ssl_client_certificate_selector.h" |
| 75 #include "chrome/browser/tab_contents/tab_util.h" | 74 #include "chrome/browser/tab_contents/tab_util.h" |
| 76 #include "chrome/browser/ui/blocked_content/blocked_window_params.h" | 75 #include "chrome/browser/ui/blocked_content/blocked_window_params.h" |
| 77 #include "chrome/browser/ui/blocked_content/popup_blocker_tab_helper.h" | 76 #include "chrome/browser/ui/blocked_content/popup_blocker_tab_helper.h" |
| 78 #include "chrome/browser/ui/chrome_select_file_policy.h" | 77 #include "chrome/browser/ui/chrome_select_file_policy.h" |
| 79 #include "chrome/browser/ui/sync/sync_promo_ui.h" | 78 #include "chrome/browser/ui/sync/sync_promo_ui.h" |
| (...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 112 #include "content/public/browser/render_process_host.h" | 111 #include "content/public/browser/render_process_host.h" |
| 113 #include "content/public/browser/render_view_host.h" | 112 #include "content/public/browser/render_view_host.h" |
| 114 #include "content/public/browser/resource_context.h" | 113 #include "content/public/browser/resource_context.h" |
| 115 #include "content/public/browser/site_instance.h" | 114 #include "content/public/browser/site_instance.h" |
| 116 #include "content/public/browser/web_contents.h" | 115 #include "content/public/browser/web_contents.h" |
| 117 #include "content/public/common/child_process_host.h" | 116 #include "content/public/common/child_process_host.h" |
| 118 #include "content/public/common/content_descriptors.h" | 117 #include "content/public/common/content_descriptors.h" |
| 119 #include "content/public/common/show_desktop_notification_params.h" | 118 #include "content/public/common/show_desktop_notification_params.h" |
| 120 #include "content/public/common/url_utils.h" | 119 #include "content/public/common/url_utils.h" |
| 121 #include "content/public/common/web_preferences.h" | 120 #include "content/public/common/web_preferences.h" |
| 122 #include "extensions/browser/extension_system.h" | |
| 123 #include "extensions/common/constants.h" | |
| 124 #include "extensions/common/extension.h" | |
| 125 #include "extensions/common/extension_set.h" | |
| 126 #include "extensions/common/manifest_handlers/shared_module_info.h" | |
| 127 #include "extensions/common/permissions/permissions_data.h" | |
| 128 #include "extensions/common/permissions/socket_permission.h" | |
| 129 #include "extensions/common/switches.h" | |
| 130 #include "net/base/mime_util.h" | 121 #include "net/base/mime_util.h" |
| 131 #include "net/cookies/canonical_cookie.h" | 122 #include "net/cookies/canonical_cookie.h" |
| 132 #include "net/cookies/cookie_options.h" | 123 #include "net/cookies/cookie_options.h" |
| 133 #include "net/ssl/ssl_cert_request_info.h" | 124 #include "net/ssl/ssl_cert_request_info.h" |
| 134 #include "ppapi/host/ppapi_host.h" | 125 #include "ppapi/host/ppapi_host.h" |
| 135 #include "ppapi/shared_impl/ppapi_switches.h" | 126 #include "ppapi/shared_impl/ppapi_switches.h" |
| 136 #include "ui/base/l10n/l10n_util.h" | 127 #include "ui/base/l10n/l10n_util.h" |
| 137 #include "ui/base/resource/resource_bundle.h" | 128 #include "ui/base/resource/resource_bundle.h" |
| 138 #include "ui/resources/grit/ui_resources.h" | 129 #include "ui/resources/grit/ui_resources.h" |
| 139 #include "webkit/browser/fileapi/external_mount_points.h" | 130 #include "webkit/browser/fileapi/external_mount_points.h" |
| (...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 214 #include "components/nacl/browser/nacl_host_message_filter.h" | 205 #include "components/nacl/browser/nacl_host_message_filter.h" |
| 215 #include "components/nacl/browser/nacl_process_host.h" | 206 #include "components/nacl/browser/nacl_process_host.h" |
| 216 #include "components/nacl/common/nacl_process_type.h" | 207 #include "components/nacl/common/nacl_process_type.h" |
| 217 #include "components/nacl/common/nacl_switches.h" | 208 #include "components/nacl/common/nacl_switches.h" |
| 218 #endif | 209 #endif |
| 219 | 210 |
| 220 #if defined(ENABLE_EXTENSIONS) | 211 #if defined(ENABLE_EXTENSIONS) |
| 221 #include "chrome/browser/extensions/chrome_content_browser_client_extensions_par
t.h" | 212 #include "chrome/browser/extensions/chrome_content_browser_client_extensions_par
t.h" |
| 222 #include "chrome/browser/extensions/extension_service.h" | 213 #include "chrome/browser/extensions/extension_service.h" |
| 223 #include "chrome/browser/extensions/extension_util.h" | 214 #include "chrome/browser/extensions/extension_util.h" |
| 215 #include "chrome/browser/speech/extension_api/tts_engine_extension_api.h" |
| 216 #include "extensions/browser/extension_system.h" |
| 224 #include "extensions/browser/guest_view/guest_view_base.h" | 217 #include "extensions/browser/guest_view/guest_view_base.h" |
| 225 #include "extensions/browser/guest_view/guest_view_constants.h" | 218 #include "extensions/browser/guest_view/guest_view_constants.h" |
| 226 #include "extensions/browser/guest_view/guest_view_manager.h" | 219 #include "extensions/browser/guest_view/guest_view_manager.h" |
| 227 #include "extensions/browser/guest_view/web_view/web_view_guest.h" | 220 #include "extensions/browser/guest_view/web_view/web_view_guest.h" |
| 228 #include "extensions/browser/guest_view/web_view/web_view_permission_helper.h" | 221 #include "extensions/browser/guest_view/web_view/web_view_permission_helper.h" |
| 229 #include "extensions/browser/guest_view/web_view/web_view_renderer_state.h" | 222 #include "extensions/browser/guest_view/web_view/web_view_renderer_state.h" |
| 230 #include "extensions/browser/suggest_permission_util.h" | 223 #include "extensions/browser/suggest_permission_util.h" |
| 224 #include "extensions/common/constants.h" |
| 225 #include "extensions/common/extension.h" |
| 226 #include "extensions/common/extension_set.h" |
| 231 #include "extensions/common/manifest_handlers/background_info.h" | 227 #include "extensions/common/manifest_handlers/background_info.h" |
| 228 #include "extensions/common/manifest_handlers/shared_module_info.h" |
| 229 #include "extensions/common/permissions/permissions_data.h" |
| 230 #include "extensions/common/permissions/socket_permission.h" |
| 231 #include "extensions/common/switches.h" |
| 232 #endif | 232 #endif |
| 233 | 233 |
| 234 #if defined(ENABLE_SPELLCHECK) | 234 #if defined(ENABLE_SPELLCHECK) |
| 235 #include "chrome/browser/spellchecker/spellcheck_message_filter.h" | 235 #include "chrome/browser/spellchecker/spellcheck_message_filter.h" |
| 236 #endif | 236 #endif |
| 237 | 237 |
| 238 #if defined(ENABLE_WEBRTC) | 238 #if defined(ENABLE_WEBRTC) |
| 239 #include "chrome/browser/media/webrtc_logging_handler_host.h" | 239 #include "chrome/browser/media/webrtc_logging_handler_host.h" |
| 240 #endif | 240 #endif |
| 241 | 241 |
| 242 using base::FileDescriptor; | 242 using base::FileDescriptor; |
| 243 using blink::WebWindowFeatures; | 243 using blink::WebWindowFeatures; |
| 244 using content::AccessTokenStore; | 244 using content::AccessTokenStore; |
| 245 using content::BrowserThread; | 245 using content::BrowserThread; |
| 246 using content::BrowserURLHandler; | 246 using content::BrowserURLHandler; |
| 247 using content::ChildProcessSecurityPolicy; | 247 using content::ChildProcessSecurityPolicy; |
| 248 using content::QuotaPermissionContext; | 248 using content::QuotaPermissionContext; |
| 249 using content::RenderFrameHost; | 249 using content::RenderFrameHost; |
| 250 using content::RenderViewHost; | 250 using content::RenderViewHost; |
| 251 using content::ResourceType; | 251 using content::ResourceType; |
| 252 using content::SiteInstance; | 252 using content::SiteInstance; |
| 253 using content::WebContents; | 253 using content::WebContents; |
| 254 using content::WebPreferences; | 254 using content::WebPreferences; |
| 255 using extensions::APIPermission; | |
| 256 using extensions::Extension; | |
| 257 using extensions::InfoMap; | |
| 258 using extensions::Manifest; | |
| 259 using message_center::NotifierId; | 255 using message_center::NotifierId; |
| 260 | 256 |
| 261 #if defined(OS_POSIX) | 257 #if defined(OS_POSIX) |
| 262 using content::FileDescriptorInfo; | 258 using content::FileDescriptorInfo; |
| 263 #endif | 259 #endif |
| 264 | 260 |
| 265 #if defined(ENABLE_EXTENSIONS) | 261 #if defined(ENABLE_EXTENSIONS) |
| 262 using extensions::APIPermission; |
| 266 using extensions::ChromeContentBrowserClientExtensionsPart; | 263 using extensions::ChromeContentBrowserClientExtensionsPart; |
| 264 using extensions::Extension; |
| 265 using extensions::InfoMap; |
| 266 using extensions::Manifest; |
| 267 #endif | 267 #endif |
| 268 | 268 |
| 269 namespace { | 269 namespace { |
| 270 | 270 |
| 271 // Cached version of the locale so we can return the locale on the I/O | 271 // Cached version of the locale so we can return the locale on the I/O |
| 272 // thread. | 272 // thread. |
| 273 base::LazyInstance<std::string> g_io_thread_application_locale; | 273 base::LazyInstance<std::string> g_io_thread_application_locale; |
| 274 | 274 |
| 275 #if defined(ENABLE_PLUGINS) | 275 #if defined(ENABLE_PLUGINS) |
| 276 // TODO(teravest): Add renderer-side API-specific checking for these APIs so | 276 // TODO(teravest): Add renderer-side API-specific checking for these APIs so |
| (...skipping 1038 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1315 command_line->AppendSwitch(switches::kEnableOfflineLoadStaleCache); | 1315 command_line->AppendSwitch(switches::kEnableOfflineLoadStaleCache); |
| 1316 } | 1316 } |
| 1317 } | 1317 } |
| 1318 | 1318 |
| 1319 // Please keep this in alphabetical order. | 1319 // Please keep this in alphabetical order. |
| 1320 static const char* const kSwitchNames[] = { | 1320 static const char* const kSwitchNames[] = { |
| 1321 autofill::switches::kDisableIgnoreAutocompleteOff, | 1321 autofill::switches::kDisableIgnoreAutocompleteOff, |
| 1322 autofill::switches::kDisablePasswordGeneration, | 1322 autofill::switches::kDisablePasswordGeneration, |
| 1323 autofill::switches::kEnablePasswordGeneration, | 1323 autofill::switches::kEnablePasswordGeneration, |
| 1324 autofill::switches::kLocalHeuristicsOnlyForPasswordGeneration, | 1324 autofill::switches::kLocalHeuristicsOnlyForPasswordGeneration, |
| 1325 #if defined(ENABLE_EXTENSIONS) |
| 1325 extensions::switches::kAllowHTTPBackgroundPage, | 1326 extensions::switches::kAllowHTTPBackgroundPage, |
| 1326 extensions::switches::kAllowLegacyExtensionManifests, | 1327 extensions::switches::kAllowLegacyExtensionManifests, |
| 1327 extensions::switches::kEnableAppView, | 1328 extensions::switches::kEnableAppView, |
| 1328 extensions::switches::kEnableEmbeddedExtensionOptions, | 1329 extensions::switches::kEnableEmbeddedExtensionOptions, |
| 1329 extensions::switches::kEnableExperimentalExtensionApis, | 1330 extensions::switches::kEnableExperimentalExtensionApis, |
| 1330 extensions::switches::kEnableScriptsRequireAction, | 1331 extensions::switches::kEnableScriptsRequireAction, |
| 1331 extensions::switches::kExtensionsOnChromeURLs, | 1332 extensions::switches::kExtensionsOnChromeURLs, |
| 1332 extensions::switches::kWhitelistedExtensionID, | 1333 extensions::switches::kWhitelistedExtensionID, |
| 1334 #endif |
| 1333 switches::kAppsCheckoutURL, | 1335 switches::kAppsCheckoutURL, |
| 1334 switches::kAppsGalleryURL, | 1336 switches::kAppsGalleryURL, |
| 1335 switches::kCloudPrintURL, | 1337 switches::kCloudPrintURL, |
| 1336 switches::kCloudPrintXmppEndpoint, | 1338 switches::kCloudPrintXmppEndpoint, |
| 1337 switches::kDisableBundledPpapiFlash, | 1339 switches::kDisableBundledPpapiFlash, |
| 1338 switches::kEnableAppWindowControls, | 1340 switches::kEnableAppWindowControls, |
| 1339 switches::kEnableBenchmarking, | 1341 switches::kEnableBenchmarking, |
| 1340 switches::kEnableNaCl, | 1342 switches::kEnableNaCl, |
| 1341 #if !defined(DISABLE_NACL) | 1343 #if !defined(DISABLE_NACL) |
| 1342 switches::kEnableNaClDebug, | 1344 switches::kEnableNaClDebug, |
| (...skipping 12 matching lines...) Expand all Loading... |
| 1355 switches::kProfilingAtStart, | 1357 switches::kProfilingAtStart, |
| 1356 switches::kProfilingFile, | 1358 switches::kProfilingFile, |
| 1357 switches::kProfilingFlush, | 1359 switches::kProfilingFlush, |
| 1358 switches::kRecordMode, | 1360 switches::kRecordMode, |
| 1359 translate::switches::kTranslateSecurityOrigin, | 1361 translate::switches::kTranslateSecurityOrigin, |
| 1360 }; | 1362 }; |
| 1361 | 1363 |
| 1362 command_line->CopySwitchesFrom(browser_command_line, kSwitchNames, | 1364 command_line->CopySwitchesFrom(browser_command_line, kSwitchNames, |
| 1363 arraysize(kSwitchNames)); | 1365 arraysize(kSwitchNames)); |
| 1364 } else if (process_type == switches::kUtilityProcess) { | 1366 } else if (process_type == switches::kUtilityProcess) { |
| 1367 #if defined(ENABLE_EXTENSIONS) |
| 1365 static const char* const kSwitchNames[] = { | 1368 static const char* const kSwitchNames[] = { |
| 1366 extensions::switches::kAllowHTTPBackgroundPage, | 1369 extensions::switches::kAllowHTTPBackgroundPage, |
| 1367 extensions::switches::kEnableExperimentalExtensionApis, | 1370 extensions::switches::kEnableExperimentalExtensionApis, |
| 1368 extensions::switches::kExtensionsOnChromeURLs, | 1371 extensions::switches::kExtensionsOnChromeURLs, |
| 1369 extensions::switches::kWhitelistedExtensionID, | 1372 extensions::switches::kWhitelistedExtensionID, |
| 1370 }; | 1373 }; |
| 1371 | 1374 |
| 1372 command_line->CopySwitchesFrom(browser_command_line, kSwitchNames, | 1375 command_line->CopySwitchesFrom(browser_command_line, kSwitchNames, |
| 1373 arraysize(kSwitchNames)); | 1376 arraysize(kSwitchNames)); |
| 1377 #endif |
| 1374 } else if (process_type == switches::kPluginProcess) { | 1378 } else if (process_type == switches::kPluginProcess) { |
| 1375 #if defined(OS_CHROMEOS) | 1379 #if defined(OS_CHROMEOS) |
| 1376 static const char* const kSwitchNames[] = { | 1380 static const char* const kSwitchNames[] = { |
| 1377 chromeos::switches::kLoginProfile, | 1381 chromeos::switches::kLoginProfile, |
| 1378 }; | 1382 }; |
| 1379 | 1383 |
| 1380 command_line->CopySwitchesFrom(browser_command_line, kSwitchNames, | 1384 command_line->CopySwitchesFrom(browser_command_line, kSwitchNames, |
| 1381 arraysize(kSwitchNames)); | 1385 arraysize(kSwitchNames)); |
| 1382 #endif | 1386 #endif |
| 1383 } else if (process_type == switches::kZygoteProcess) { | 1387 } else if (process_type == switches::kZygoteProcess) { |
| (...skipping 1198 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2582 switches::kDisableWebRtcEncryption, | 2586 switches::kDisableWebRtcEncryption, |
| 2583 }; | 2587 }; |
| 2584 to_command_line->CopySwitchesFrom(from_command_line, | 2588 to_command_line->CopySwitchesFrom(from_command_line, |
| 2585 kWebRtcDevSwitchNames, | 2589 kWebRtcDevSwitchNames, |
| 2586 arraysize(kWebRtcDevSwitchNames)); | 2590 arraysize(kWebRtcDevSwitchNames)); |
| 2587 } | 2591 } |
| 2588 } | 2592 } |
| 2589 #endif // defined(ENABLE_WEBRTC) | 2593 #endif // defined(ENABLE_WEBRTC) |
| 2590 | 2594 |
| 2591 } // namespace chrome | 2595 } // namespace chrome |
| OLD | NEW |