| 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 107 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 118 #include "content/public/browser/render_process_host.h" | 118 #include "content/public/browser/render_process_host.h" |
| 119 #include "content/public/browser/render_view_host.h" | 119 #include "content/public/browser/render_view_host.h" |
| 120 #include "content/public/browser/resource_context.h" | 120 #include "content/public/browser/resource_context.h" |
| 121 #include "content/public/browser/site_instance.h" | 121 #include "content/public/browser/site_instance.h" |
| 122 #include "content/public/browser/web_contents.h" | 122 #include "content/public/browser/web_contents.h" |
| 123 #include "content/public/browser/web_contents_view.h" | 123 #include "content/public/browser/web_contents_view.h" |
| 124 #include "content/public/common/child_process_host.h" | 124 #include "content/public/common/child_process_host.h" |
| 125 #include "content/public/common/content_descriptors.h" | 125 #include "content/public/common/content_descriptors.h" |
| 126 #include "extensions/browser/view_type_utils.h" | 126 #include "extensions/browser/view_type_utils.h" |
| 127 #include "extensions/common/constants.h" | 127 #include "extensions/common/constants.h" |
| 128 #include "extensions/common/switches.h" |
| 128 #include "grit/generated_resources.h" | 129 #include "grit/generated_resources.h" |
| 129 #include "grit/ui_resources.h" | 130 #include "grit/ui_resources.h" |
| 130 #include "net/base/escape.h" | 131 #include "net/base/escape.h" |
| 131 #include "net/base/mime_util.h" | 132 #include "net/base/mime_util.h" |
| 132 #include "net/cookies/canonical_cookie.h" | 133 #include "net/cookies/canonical_cookie.h" |
| 133 #include "net/cookies/cookie_options.h" | 134 #include "net/cookies/cookie_options.h" |
| 134 #include "net/ssl/ssl_cert_request_info.h" | 135 #include "net/ssl/ssl_cert_request_info.h" |
| 135 #include "ppapi/host/ppapi_host.h" | 136 #include "ppapi/host/ppapi_host.h" |
| 136 #include "ui/base/l10n/l10n_util.h" | 137 #include "ui/base/l10n/l10n_util.h" |
| 137 #include "ui/base/resource/resource_bundle.h" | 138 #include "ui/base/resource/resource_bundle.h" |
| (...skipping 1242 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1380 command_line->AppendSwitch(switches::kEnableThreadedCompositing); | 1381 command_line->AppendSwitch(switches::kEnableThreadedCompositing); |
| 1381 | 1382 |
| 1382 if (message_center::IsRichNotificationEnabled()) | 1383 if (message_center::IsRichNotificationEnabled()) |
| 1383 command_line->AppendSwitch(switches::kDisableHTMLNotifications); | 1384 command_line->AppendSwitch(switches::kDisableHTMLNotifications); |
| 1384 | 1385 |
| 1385 // Please keep this in alphabetical order. | 1386 // Please keep this in alphabetical order. |
| 1386 static const char* const kSwitchNames[] = { | 1387 static const char* const kSwitchNames[] = { |
| 1387 autofill::switches::kDisableInteractiveAutocomplete, | 1388 autofill::switches::kDisableInteractiveAutocomplete, |
| 1388 autofill::switches::kEnableExperimentalFormFilling, | 1389 autofill::switches::kEnableExperimentalFormFilling, |
| 1389 autofill::switches::kEnableInteractiveAutocomplete, | 1390 autofill::switches::kEnableInteractiveAutocomplete, |
| 1391 extensions::switches::kAllowLegacyExtensionManifests, |
| 1392 extensions::switches::kAllowScriptingGallery, |
| 1393 extensions::switches::kExtensionsOnChromeURLs, |
| 1390 switches::kAllowHTTPBackgroundPage, | 1394 switches::kAllowHTTPBackgroundPage, |
| 1391 switches::kAllowLegacyExtensionManifests, | |
| 1392 // TODO(victorhsieh): remove the following flag once we move PPAPI FileIO | 1395 // TODO(victorhsieh): remove the following flag once we move PPAPI FileIO |
| 1393 // to browser. | 1396 // to browser. |
| 1394 switches::kAllowNaClFileHandleAPI, | 1397 switches::kAllowNaClFileHandleAPI, |
| 1395 switches::kAllowScriptingGallery, | |
| 1396 switches::kAppsCheckoutURL, | 1398 switches::kAppsCheckoutURL, |
| 1397 switches::kAppsGalleryURL, | 1399 switches::kAppsGalleryURL, |
| 1398 switches::kCloudPrintServiceURL, | 1400 switches::kCloudPrintServiceURL, |
| 1399 switches::kDebugPrint, | 1401 switches::kDebugPrint, |
| 1400 switches::kDisableBundledPpapiFlash, | 1402 switches::kDisableBundledPpapiFlash, |
| 1401 switches::kDisableExtensionsResourceWhitelist, | 1403 switches::kDisableExtensionsResourceWhitelist, |
| 1402 switches::kDisableScriptedPrintThrottling, | 1404 switches::kDisableScriptedPrintThrottling, |
| 1403 switches::kEnableAdview, | 1405 switches::kEnableAdview, |
| 1404 switches::kEnableAdviewSrcAttribute, | 1406 switches::kEnableAdviewSrcAttribute, |
| 1405 switches::kEnableAppWindowControls, | 1407 switches::kEnableAppWindowControls, |
| 1406 switches::kEnableBenchmarking, | 1408 switches::kEnableBenchmarking, |
| 1407 switches::kEnableExperimentalExtensionApis, | 1409 switches::kEnableExperimentalExtensionApis, |
| 1408 switches::kEnableIPCFuzzing, | 1410 switches::kEnableIPCFuzzing, |
| 1409 switches::kEnableNaCl, | 1411 switches::kEnableNaCl, |
| 1410 switches::kEnableNetBenchmarking, | 1412 switches::kEnableNetBenchmarking, |
| 1411 switches::kEnablePasswordGeneration, | 1413 switches::kEnablePasswordGeneration, |
| 1412 switches::kEnablePnacl, | 1414 switches::kEnablePnacl, |
| 1413 switches::kEnableWatchdog, | 1415 switches::kEnableWatchdog, |
| 1414 switches::kExtensionsOnChromeURLs, | |
| 1415 switches::kMemoryProfiling, | 1416 switches::kMemoryProfiling, |
| 1416 switches::kMessageLoopHistogrammer, | 1417 switches::kMessageLoopHistogrammer, |
| 1417 switches::kNoJsRandomness, | 1418 switches::kNoJsRandomness, |
| 1418 switches::kPlaybackMode, | 1419 switches::kPlaybackMode, |
| 1419 switches::kPpapiFlashArgs, | 1420 switches::kPpapiFlashArgs, |
| 1420 switches::kPpapiFlashInProcess, | 1421 switches::kPpapiFlashInProcess, |
| 1421 switches::kPpapiFlashPath, | 1422 switches::kPpapiFlashPath, |
| 1422 switches::kPpapiFlashVersion, | 1423 switches::kPpapiFlashVersion, |
| 1423 switches::kProfilingAtStart, | 1424 switches::kProfilingAtStart, |
| 1424 switches::kProfilingFile, | 1425 switches::kProfilingFile, |
| 1425 switches::kProfilingFlush, | 1426 switches::kProfilingFlush, |
| 1426 switches::kRecordMode, | 1427 switches::kRecordMode, |
| 1427 switches::kSilentDumpOnDCHECK, | 1428 switches::kSilentDumpOnDCHECK, |
| 1428 switches::kSpdyProxyAuthOrigin, | 1429 switches::kSpdyProxyAuthOrigin, |
| 1429 switches::kWhitelistedExtensionID, | 1430 switches::kWhitelistedExtensionID, |
| 1430 }; | 1431 }; |
| 1431 | 1432 |
| 1432 command_line->CopySwitchesFrom(browser_command_line, kSwitchNames, | 1433 command_line->CopySwitchesFrom(browser_command_line, kSwitchNames, |
| 1433 arraysize(kSwitchNames)); | 1434 arraysize(kSwitchNames)); |
| 1434 } else if (process_type == switches::kUtilityProcess) { | 1435 } else if (process_type == switches::kUtilityProcess) { |
| 1435 static const char* const kSwitchNames[] = { | 1436 static const char* const kSwitchNames[] = { |
| 1437 extensions::switches::kExtensionsOnChromeURLs, |
| 1436 switches::kAllowHTTPBackgroundPage, | 1438 switches::kAllowHTTPBackgroundPage, |
| 1437 switches::kEnableExperimentalExtensionApis, | 1439 switches::kEnableExperimentalExtensionApis, |
| 1438 switches::kExtensionsOnChromeURLs, | |
| 1439 switches::kWhitelistedExtensionID, | 1440 switches::kWhitelistedExtensionID, |
| 1440 }; | 1441 }; |
| 1441 | 1442 |
| 1442 command_line->CopySwitchesFrom(browser_command_line, kSwitchNames, | 1443 command_line->CopySwitchesFrom(browser_command_line, kSwitchNames, |
| 1443 arraysize(kSwitchNames)); | 1444 arraysize(kSwitchNames)); |
| 1444 } else if (process_type == switches::kPluginProcess) { | 1445 } else if (process_type == switches::kPluginProcess) { |
| 1445 static const char* const kSwitchNames[] = { | 1446 static const char* const kSwitchNames[] = { |
| 1446 #if defined(OS_CHROMEOS) | 1447 #if defined(OS_CHROMEOS) |
| 1447 chromeos::switches::kLoginProfile, | 1448 chromeos::switches::kLoginProfile, |
| 1448 #endif | 1449 #endif |
| (...skipping 1012 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2461 #if defined(USE_NSS) | 2462 #if defined(USE_NSS) |
| 2462 crypto::CryptoModuleBlockingPasswordDelegate* | 2463 crypto::CryptoModuleBlockingPasswordDelegate* |
| 2463 ChromeContentBrowserClient::GetCryptoPasswordDelegate( | 2464 ChromeContentBrowserClient::GetCryptoPasswordDelegate( |
| 2464 const GURL& url) { | 2465 const GURL& url) { |
| 2465 return chrome::NewCryptoModuleBlockingDialogDelegate( | 2466 return chrome::NewCryptoModuleBlockingDialogDelegate( |
| 2466 chrome::kCryptoModulePasswordKeygen, url.host()); | 2467 chrome::kCryptoModulePasswordKeygen, url.host()); |
| 2467 } | 2468 } |
| 2468 #endif | 2469 #endif |
| 2469 | 2470 |
| 2470 } // namespace chrome | 2471 } // namespace chrome |
| OLD | NEW |