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 106 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
117 #include "content/public/browser/render_frame_host.h" | 117 #include "content/public/browser/render_frame_host.h" |
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 "content/public/common/url_utils.h" | 126 #include "content/public/common/url_utils.h" |
| 127 #include "content/public/common/webpreferences.h" |
127 #include "extensions/browser/extension_registry.h" | 128 #include "extensions/browser/extension_registry.h" |
128 #include "extensions/browser/info_map.h" | 129 #include "extensions/browser/info_map.h" |
129 #include "extensions/browser/process_manager.h" | 130 #include "extensions/browser/process_manager.h" |
130 #include "extensions/browser/process_map.h" | 131 #include "extensions/browser/process_map.h" |
131 #include "extensions/browser/view_type_utils.h" | 132 #include "extensions/browser/view_type_utils.h" |
132 #include "extensions/common/constants.h" | 133 #include "extensions/common/constants.h" |
133 #include "extensions/common/extension.h" | 134 #include "extensions/common/extension.h" |
134 #include "extensions/common/extension_set.h" | 135 #include "extensions/common/extension_set.h" |
135 #include "extensions/common/manifest_handlers/background_info.h" | 136 #include "extensions/common/manifest_handlers/background_info.h" |
136 #include "extensions/common/manifest_handlers/shared_module_info.h" | 137 #include "extensions/common/manifest_handlers/shared_module_info.h" |
137 #include "extensions/common/manifest_handlers/web_accessible_resources_info.h" | 138 #include "extensions/common/manifest_handlers/web_accessible_resources_info.h" |
138 #include "extensions/common/permissions/permissions_data.h" | 139 #include "extensions/common/permissions/permissions_data.h" |
139 #include "extensions/common/switches.h" | 140 #include "extensions/common/switches.h" |
140 #include "grit/generated_resources.h" | 141 #include "grit/generated_resources.h" |
141 #include "grit/ui_resources.h" | 142 #include "grit/ui_resources.h" |
142 #include "net/base/mime_util.h" | 143 #include "net/base/mime_util.h" |
143 #include "net/cookies/canonical_cookie.h" | 144 #include "net/cookies/canonical_cookie.h" |
144 #include "net/cookies/cookie_options.h" | 145 #include "net/cookies/cookie_options.h" |
145 #include "net/ssl/ssl_cert_request_info.h" | 146 #include "net/ssl/ssl_cert_request_info.h" |
146 #include "ppapi/host/ppapi_host.h" | 147 #include "ppapi/host/ppapi_host.h" |
147 #include "ppapi/shared_impl/ppapi_switches.h" | 148 #include "ppapi/shared_impl/ppapi_switches.h" |
148 #include "ui/base/l10n/l10n_util.h" | 149 #include "ui/base/l10n/l10n_util.h" |
149 #include "ui/base/resource/resource_bundle.h" | 150 #include "ui/base/resource/resource_bundle.h" |
150 #include "ui/message_center/message_center_util.h" | 151 #include "ui/message_center/message_center_util.h" |
151 #include "webkit/browser/fileapi/external_mount_points.h" | 152 #include "webkit/browser/fileapi/external_mount_points.h" |
152 #include "webkit/common/webpreferences.h" | |
153 | 153 |
154 #if defined(OS_WIN) | 154 #if defined(OS_WIN) |
155 #include "base/win/windows_version.h" | 155 #include "base/win/windows_version.h" |
156 #include "chrome/browser/chrome_browser_main_win.h" | 156 #include "chrome/browser/chrome_browser_main_win.h" |
157 #include "sandbox/win/src/sandbox_policy.h" | 157 #include "sandbox/win/src/sandbox_policy.h" |
158 #elif defined(OS_MACOSX) | 158 #elif defined(OS_MACOSX) |
159 #include "chrome/browser/chrome_browser_main_mac.h" | 159 #include "chrome/browser/chrome_browser_main_mac.h" |
160 #include "chrome/browser/spellchecker/spellcheck_message_filter_mac.h" | 160 #include "chrome/browser/spellchecker/spellcheck_message_filter_mac.h" |
161 #include "components/breakpad/app/breakpad_mac.h" | 161 #include "components/breakpad/app/breakpad_mac.h" |
162 #elif defined(OS_CHROMEOS) | 162 #elif defined(OS_CHROMEOS) |
(...skipping 309 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
472 (cert.issuer().common_name == common_name)) { | 472 (cert.issuer().common_name == common_name)) { |
473 return true; | 473 return true; |
474 } | 474 } |
475 return false; | 475 return false; |
476 } | 476 } |
477 | 477 |
478 #if !defined(OS_ANDROID) | 478 #if !defined(OS_ANDROID) |
479 // Fills |map| with the per-script font prefs under path |map_name|. | 479 // Fills |map| with the per-script font prefs under path |map_name|. |
480 void FillFontFamilyMap(const PrefService* prefs, | 480 void FillFontFamilyMap(const PrefService* prefs, |
481 const char* map_name, | 481 const char* map_name, |
482 webkit_glue::ScriptFontFamilyMap* map) { | 482 content::ScriptFontFamilyMap* map) { |
483 // TODO: Get rid of the brute-force scan over possible (font family / script) | 483 // TODO: Get rid of the brute-force scan over possible (font family / script) |
484 // combinations - see http://crbug.com/308095. | 484 // combinations - see http://crbug.com/308095. |
485 for (size_t i = 0; i < prefs::kWebKitScriptsForFontFamilyMapsLength; ++i) { | 485 for (size_t i = 0; i < prefs::kWebKitScriptsForFontFamilyMapsLength; ++i) { |
486 const char* script = prefs::kWebKitScriptsForFontFamilyMaps[i]; | 486 const char* script = prefs::kWebKitScriptsForFontFamilyMaps[i]; |
487 std::string pref_name = base::StringPrintf("%s.%s", map_name, script); | 487 std::string pref_name = base::StringPrintf("%s.%s", map_name, script); |
488 std::string font_family = prefs->GetString(pref_name.c_str()); | 488 std::string font_family = prefs->GetString(pref_name.c_str()); |
489 if (!font_family.empty()) | 489 if (!font_family.empty()) |
490 (*map)[script] = base::UTF8ToUTF16(font_family); | 490 (*map)[script] = base::UTF8ToUTF16(font_family); |
491 } | 491 } |
492 } | 492 } |
(...skipping 2208 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2701 // releases of Chrome. Permitting "Unknown" allows these APIs to be used on | 2701 // releases of Chrome. Permitting "Unknown" allows these APIs to be used on |
2702 // Chromium builds as well. | 2702 // Chromium builds as well. |
2703 return channel <= chrome::VersionInfo::CHANNEL_DEV; | 2703 return channel <= chrome::VersionInfo::CHANNEL_DEV; |
2704 #else | 2704 #else |
2705 return false; | 2705 return false; |
2706 #endif | 2706 #endif |
2707 } | 2707 } |
2708 | 2708 |
2709 | 2709 |
2710 } // namespace chrome | 2710 } // namespace chrome |
OLD | NEW |