| 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 104 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 115 #include "content/public/browser/child_process_security_policy.h" | 115 #include "content/public/browser/child_process_security_policy.h" |
| 116 #include "content/public/browser/render_frame_host.h" | 116 #include "content/public/browser/render_frame_host.h" |
| 117 #include "content/public/browser/render_process_host.h" | 117 #include "content/public/browser/render_process_host.h" |
| 118 #include "content/public/browser/render_view_host.h" | 118 #include "content/public/browser/render_view_host.h" |
| 119 #include "content/public/browser/resource_context.h" | 119 #include "content/public/browser/resource_context.h" |
| 120 #include "content/public/browser/site_instance.h" | 120 #include "content/public/browser/site_instance.h" |
| 121 #include "content/public/browser/web_contents.h" | 121 #include "content/public/browser/web_contents.h" |
| 122 #include "content/public/common/child_process_host.h" | 122 #include "content/public/common/child_process_host.h" |
| 123 #include "content/public/common/content_descriptors.h" | 123 #include "content/public/common/content_descriptors.h" |
| 124 #include "content/public/common/url_utils.h" | 124 #include "content/public/common/url_utils.h" |
| 125 #include "content/public/common/web_preferences.h" |
| 125 #include "extensions/browser/extension_host.h" | 126 #include "extensions/browser/extension_host.h" |
| 126 #include "extensions/browser/extension_message_filter.h" | 127 #include "extensions/browser/extension_message_filter.h" |
| 127 #include "extensions/browser/extension_registry.h" | 128 #include "extensions/browser/extension_registry.h" |
| 128 #include "extensions/browser/extension_system.h" | 129 #include "extensions/browser/extension_system.h" |
| 129 #include "extensions/browser/info_map.h" | 130 #include "extensions/browser/info_map.h" |
| 130 #include "extensions/browser/process_manager.h" | 131 #include "extensions/browser/process_manager.h" |
| 131 #include "extensions/browser/process_map.h" | 132 #include "extensions/browser/process_map.h" |
| 132 #include "extensions/browser/view_type_utils.h" | 133 #include "extensions/browser/view_type_utils.h" |
| 133 #include "extensions/common/constants.h" | 134 #include "extensions/common/constants.h" |
| 134 #include "extensions/common/extension.h" | 135 #include "extensions/common/extension.h" |
| 135 #include "extensions/common/extension_set.h" | 136 #include "extensions/common/extension_set.h" |
| 136 #include "extensions/common/manifest_handlers/background_info.h" | 137 #include "extensions/common/manifest_handlers/background_info.h" |
| 137 #include "extensions/common/manifest_handlers/shared_module_info.h" | 138 #include "extensions/common/manifest_handlers/shared_module_info.h" |
| 138 #include "extensions/common/manifest_handlers/web_accessible_resources_info.h" | 139 #include "extensions/common/manifest_handlers/web_accessible_resources_info.h" |
| 139 #include "extensions/common/permissions/permissions_data.h" | 140 #include "extensions/common/permissions/permissions_data.h" |
| 140 #include "extensions/common/permissions/socket_permission.h" | 141 #include "extensions/common/permissions/socket_permission.h" |
| 141 #include "extensions/common/switches.h" | 142 #include "extensions/common/switches.h" |
| 142 #include "grit/generated_resources.h" | 143 #include "grit/generated_resources.h" |
| 143 #include "grit/ui_resources.h" | 144 #include "grit/ui_resources.h" |
| 144 #include "net/base/mime_util.h" | 145 #include "net/base/mime_util.h" |
| 145 #include "net/cookies/canonical_cookie.h" | 146 #include "net/cookies/canonical_cookie.h" |
| 146 #include "net/cookies/cookie_options.h" | 147 #include "net/cookies/cookie_options.h" |
| 147 #include "net/ssl/ssl_cert_request_info.h" | 148 #include "net/ssl/ssl_cert_request_info.h" |
| 148 #include "ppapi/host/ppapi_host.h" | 149 #include "ppapi/host/ppapi_host.h" |
| 149 #include "ppapi/shared_impl/ppapi_switches.h" | 150 #include "ppapi/shared_impl/ppapi_switches.h" |
| 150 #include "ui/base/l10n/l10n_util.h" | 151 #include "ui/base/l10n/l10n_util.h" |
| 151 #include "ui/base/resource/resource_bundle.h" | 152 #include "ui/base/resource/resource_bundle.h" |
| 152 #include "webkit/browser/fileapi/external_mount_points.h" | 153 #include "webkit/browser/fileapi/external_mount_points.h" |
| 153 #include "webkit/common/webpreferences.h" | |
| 154 | 154 |
| 155 #if defined(OS_WIN) | 155 #if defined(OS_WIN) |
| 156 #include "base/win/windows_version.h" | 156 #include "base/win/windows_version.h" |
| 157 #include "chrome/browser/chrome_browser_main_win.h" | 157 #include "chrome/browser/chrome_browser_main_win.h" |
| 158 #include "sandbox/win/src/sandbox_policy.h" | 158 #include "sandbox/win/src/sandbox_policy.h" |
| 159 #elif defined(OS_MACOSX) | 159 #elif defined(OS_MACOSX) |
| 160 #include "chrome/browser/chrome_browser_main_mac.h" | 160 #include "chrome/browser/chrome_browser_main_mac.h" |
| 161 #include "chrome/browser/spellchecker/spellcheck_message_filter_mac.h" | 161 #include "chrome/browser/spellchecker/spellcheck_message_filter_mac.h" |
| 162 #include "components/breakpad/app/breakpad_mac.h" | 162 #include "components/breakpad/app/breakpad_mac.h" |
| 163 #elif defined(OS_CHROMEOS) | 163 #elif defined(OS_CHROMEOS) |
| (...skipping 90 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 254 using content::BrowserChildProcessHostIterator; | 254 using content::BrowserChildProcessHostIterator; |
| 255 using content::BrowserThread; | 255 using content::BrowserThread; |
| 256 using content::BrowserURLHandler; | 256 using content::BrowserURLHandler; |
| 257 using content::ChildProcessSecurityPolicy; | 257 using content::ChildProcessSecurityPolicy; |
| 258 using content::QuotaPermissionContext; | 258 using content::QuotaPermissionContext; |
| 259 using content::RenderFrameHost; | 259 using content::RenderFrameHost; |
| 260 using content::RenderViewHost; | 260 using content::RenderViewHost; |
| 261 using content::ResourceType; | 261 using content::ResourceType; |
| 262 using content::SiteInstance; | 262 using content::SiteInstance; |
| 263 using content::WebContents; | 263 using content::WebContents; |
| 264 using content::WebPreferences; |
| 264 using extensions::APIPermission; | 265 using extensions::APIPermission; |
| 265 using extensions::Extension; | 266 using extensions::Extension; |
| 266 using extensions::InfoMap; | 267 using extensions::InfoMap; |
| 267 using extensions::Manifest; | 268 using extensions::Manifest; |
| 268 using message_center::NotifierId; | 269 using message_center::NotifierId; |
| 269 | 270 |
| 270 #if defined(OS_POSIX) | 271 #if defined(OS_POSIX) |
| 271 using content::FileDescriptorInfo; | 272 using content::FileDescriptorInfo; |
| 272 #endif | 273 #endif |
| 273 | 274 |
| (...skipping 214 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 488 (cert.issuer().common_name == common_name)) { | 489 (cert.issuer().common_name == common_name)) { |
| 489 return true; | 490 return true; |
| 490 } | 491 } |
| 491 return false; | 492 return false; |
| 492 } | 493 } |
| 493 | 494 |
| 494 #if !defined(OS_ANDROID) | 495 #if !defined(OS_ANDROID) |
| 495 // Fills |map| with the per-script font prefs under path |map_name|. | 496 // Fills |map| with the per-script font prefs under path |map_name|. |
| 496 void FillFontFamilyMap(const PrefService* prefs, | 497 void FillFontFamilyMap(const PrefService* prefs, |
| 497 const char* map_name, | 498 const char* map_name, |
| 498 webkit_glue::ScriptFontFamilyMap* map) { | 499 content::ScriptFontFamilyMap* map) { |
| 499 // TODO(falken): Get rid of the brute-force scan over possible | 500 // TODO(falken): Get rid of the brute-force scan over possible |
| 500 // (font family / script) combinations - see http://crbug.com/308095. | 501 // (font family / script) combinations - see http://crbug.com/308095. |
| 501 for (size_t i = 0; i < prefs::kWebKitScriptsForFontFamilyMapsLength; ++i) { | 502 for (size_t i = 0; i < prefs::kWebKitScriptsForFontFamilyMapsLength; ++i) { |
| 502 const char* script = prefs::kWebKitScriptsForFontFamilyMaps[i]; | 503 const char* script = prefs::kWebKitScriptsForFontFamilyMaps[i]; |
| 503 std::string pref_name = base::StringPrintf("%s.%s", map_name, script); | 504 std::string pref_name = base::StringPrintf("%s.%s", map_name, script); |
| 504 std::string font_family = prefs->GetString(pref_name.c_str()); | 505 std::string font_family = prefs->GetString(pref_name.c_str()); |
| 505 if (!font_family.empty()) | 506 if (!font_family.empty()) |
| 506 (*map)[script] = base::UTF8ToUTF16(font_family); | 507 (*map)[script] = base::UTF8ToUTF16(font_family); |
| 507 } | 508 } |
| 508 } | 509 } |
| (...skipping 2292 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2801 switches::kDisableWebRtcEncryption, | 2802 switches::kDisableWebRtcEncryption, |
| 2802 }; | 2803 }; |
| 2803 to_command_line->CopySwitchesFrom(from_command_line, | 2804 to_command_line->CopySwitchesFrom(from_command_line, |
| 2804 kWebRtcDevSwitchNames, | 2805 kWebRtcDevSwitchNames, |
| 2805 arraysize(kWebRtcDevSwitchNames)); | 2806 arraysize(kWebRtcDevSwitchNames)); |
| 2806 } | 2807 } |
| 2807 } | 2808 } |
| 2808 #endif // defined(ENABLE_WEBRTC) | 2809 #endif // defined(ENABLE_WEBRTC) |
| 2809 | 2810 |
| 2810 } // namespace chrome | 2811 } // namespace chrome |
| OLD | NEW |