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 1240 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1378 command_line->AppendSwitch(switches::kEnableThreadedCompositing); | 1379 command_line->AppendSwitch(switches::kEnableThreadedCompositing); |
1379 | 1380 |
1380 if (message_center::IsRichNotificationEnabled()) | 1381 if (message_center::IsRichNotificationEnabled()) |
1381 command_line->AppendSwitch(switches::kDisableHTMLNotifications); | 1382 command_line->AppendSwitch(switches::kDisableHTMLNotifications); |
1382 | 1383 |
1383 // Please keep this in alphabetical order. | 1384 // Please keep this in alphabetical order. |
1384 static const char* const kSwitchNames[] = { | 1385 static const char* const kSwitchNames[] = { |
1385 autofill::switches::kDisableInteractiveAutocomplete, | 1386 autofill::switches::kDisableInteractiveAutocomplete, |
1386 autofill::switches::kEnableExperimentalFormFilling, | 1387 autofill::switches::kEnableExperimentalFormFilling, |
1387 autofill::switches::kEnableInteractiveAutocomplete, | 1388 autofill::switches::kEnableInteractiveAutocomplete, |
| 1389 extensions::switches::kAllowLegacyExtensionManifests, |
| 1390 extensions::switches::kAllowScriptingGallery, |
| 1391 extensions::switches::kExtensionsOnChromeURLs, |
1388 switches::kAllowHTTPBackgroundPage, | 1392 switches::kAllowHTTPBackgroundPage, |
1389 switches::kAllowLegacyExtensionManifests, | |
1390 // TODO(victorhsieh): remove the following flag once we move PPAPI FileIO | 1393 // TODO(victorhsieh): remove the following flag once we move PPAPI FileIO |
1391 // to browser. | 1394 // to browser. |
1392 switches::kAllowNaClFileHandleAPI, | 1395 switches::kAllowNaClFileHandleAPI, |
1393 switches::kAllowScriptingGallery, | |
1394 switches::kAppsCheckoutURL, | 1396 switches::kAppsCheckoutURL, |
1395 switches::kAppsGalleryURL, | 1397 switches::kAppsGalleryURL, |
1396 switches::kCloudPrintServiceURL, | 1398 switches::kCloudPrintServiceURL, |
1397 switches::kDebugPrint, | 1399 switches::kDebugPrint, |
1398 switches::kDisableBundledPpapiFlash, | 1400 switches::kDisableBundledPpapiFlash, |
1399 switches::kDisableExtensionsResourceWhitelist, | 1401 switches::kDisableExtensionsResourceWhitelist, |
1400 switches::kDisableScriptedPrintThrottling, | 1402 switches::kDisableScriptedPrintThrottling, |
1401 switches::kEnableAdview, | 1403 switches::kEnableAdview, |
1402 switches::kEnableAdviewSrcAttribute, | 1404 switches::kEnableAdviewSrcAttribute, |
1403 switches::kEnableAppWindowControls, | 1405 switches::kEnableAppWindowControls, |
1404 switches::kEnableBenchmarking, | 1406 switches::kEnableBenchmarking, |
1405 switches::kEnableExperimentalExtensionApis, | 1407 switches::kEnableExperimentalExtensionApis, |
1406 switches::kEnableIPCFuzzing, | 1408 switches::kEnableIPCFuzzing, |
1407 switches::kEnableNaCl, | 1409 switches::kEnableNaCl, |
1408 switches::kEnableNetBenchmarking, | 1410 switches::kEnableNetBenchmarking, |
1409 switches::kEnablePasswordGeneration, | 1411 switches::kEnablePasswordGeneration, |
1410 switches::kEnablePnacl, | 1412 switches::kEnablePnacl, |
1411 switches::kEnableWatchdog, | 1413 switches::kEnableWatchdog, |
1412 switches::kExtensionsOnChromeURLs, | |
1413 switches::kMemoryProfiling, | 1414 switches::kMemoryProfiling, |
1414 switches::kMessageLoopHistogrammer, | 1415 switches::kMessageLoopHistogrammer, |
1415 switches::kNoJsRandomness, | 1416 switches::kNoJsRandomness, |
1416 switches::kPlaybackMode, | 1417 switches::kPlaybackMode, |
1417 switches::kPpapiFlashArgs, | 1418 switches::kPpapiFlashArgs, |
1418 switches::kPpapiFlashInProcess, | 1419 switches::kPpapiFlashInProcess, |
1419 switches::kPpapiFlashPath, | 1420 switches::kPpapiFlashPath, |
1420 switches::kPpapiFlashVersion, | 1421 switches::kPpapiFlashVersion, |
1421 switches::kProfilingAtStart, | 1422 switches::kProfilingAtStart, |
1422 switches::kProfilingFile, | 1423 switches::kProfilingFile, |
1423 switches::kProfilingFlush, | 1424 switches::kProfilingFlush, |
1424 switches::kRecordMode, | 1425 switches::kRecordMode, |
1425 switches::kSilentDumpOnDCHECK, | 1426 switches::kSilentDumpOnDCHECK, |
1426 switches::kSpdyProxyAuthOrigin, | 1427 switches::kSpdyProxyAuthOrigin, |
1427 switches::kWhitelistedExtensionID, | 1428 switches::kWhitelistedExtensionID, |
1428 }; | 1429 }; |
1429 | 1430 |
1430 command_line->CopySwitchesFrom(browser_command_line, kSwitchNames, | 1431 command_line->CopySwitchesFrom(browser_command_line, kSwitchNames, |
1431 arraysize(kSwitchNames)); | 1432 arraysize(kSwitchNames)); |
1432 } else if (process_type == switches::kUtilityProcess) { | 1433 } else if (process_type == switches::kUtilityProcess) { |
1433 static const char* const kSwitchNames[] = { | 1434 static const char* const kSwitchNames[] = { |
| 1435 extensions::switches::kExtensionsOnChromeURLs, |
1434 switches::kAllowHTTPBackgroundPage, | 1436 switches::kAllowHTTPBackgroundPage, |
1435 switches::kEnableExperimentalExtensionApis, | 1437 switches::kEnableExperimentalExtensionApis, |
1436 switches::kExtensionsOnChromeURLs, | |
1437 switches::kWhitelistedExtensionID, | 1438 switches::kWhitelistedExtensionID, |
1438 }; | 1439 }; |
1439 | 1440 |
1440 command_line->CopySwitchesFrom(browser_command_line, kSwitchNames, | 1441 command_line->CopySwitchesFrom(browser_command_line, kSwitchNames, |
1441 arraysize(kSwitchNames)); | 1442 arraysize(kSwitchNames)); |
1442 } else if (process_type == switches::kPluginProcess) { | 1443 } else if (process_type == switches::kPluginProcess) { |
1443 static const char* const kSwitchNames[] = { | 1444 static const char* const kSwitchNames[] = { |
1444 #if defined(OS_CHROMEOS) | 1445 #if defined(OS_CHROMEOS) |
1445 chromeos::switches::kLoginProfile, | 1446 chromeos::switches::kLoginProfile, |
1446 #endif | 1447 #endif |
(...skipping 1012 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2459 #if defined(USE_NSS) | 2460 #if defined(USE_NSS) |
2460 crypto::CryptoModuleBlockingPasswordDelegate* | 2461 crypto::CryptoModuleBlockingPasswordDelegate* |
2461 ChromeContentBrowserClient::GetCryptoPasswordDelegate( | 2462 ChromeContentBrowserClient::GetCryptoPasswordDelegate( |
2462 const GURL& url) { | 2463 const GURL& url) { |
2463 return chrome::NewCryptoModuleBlockingDialogDelegate( | 2464 return chrome::NewCryptoModuleBlockingDialogDelegate( |
2464 chrome::kCryptoModulePasswordKeygen, url.host()); | 2465 chrome::kCryptoModulePasswordKeygen, url.host()); |
2465 } | 2466 } |
2466 #endif | 2467 #endif |
2467 | 2468 |
2468 } // namespace chrome | 2469 } // namespace chrome |
OLD | NEW |