OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 "base/command_line.h" | 7 #include "base/command_line.h" |
8 #include "chrome/app/breakpad_mac.h" | 8 #include "chrome/app/breakpad_mac.h" |
9 #include "chrome/browser/browser_about_handler.h" | 9 #include "chrome/browser/browser_about_handler.h" |
10 #include "chrome/browser/browser_process.h" | 10 #include "chrome/browser/browser_process.h" |
11 #include "chrome/browser/browsing_data_remover.h" | 11 #include "chrome/browser/browsing_data_remover.h" |
12 #include "chrome/browser/character_encoding.h" | 12 #include "chrome/browser/character_encoding.h" |
13 #include "chrome/browser/chrome_benchmarking_message_filter.h" | 13 #include "chrome/browser/chrome_benchmarking_message_filter.h" |
14 #include "chrome/browser/chrome_plugin_message_filter.h" | 14 #include "chrome/browser/chrome_plugin_message_filter.h" |
15 #include "chrome/browser/chrome_quota_permission_context.h" | 15 #include "chrome/browser/chrome_quota_permission_context.h" |
16 #include "chrome/browser/chrome_worker_message_filter.h" | 16 #include "chrome/browser/chrome_worker_message_filter.h" |
| 17 #include "chrome/browser/content_settings/content_settings_utils.h" |
17 #include "chrome/browser/content_settings/cookie_settings.h" | 18 #include "chrome/browser/content_settings/cookie_settings.h" |
18 #include "chrome/browser/content_settings/tab_specific_content_settings.h" | 19 #include "chrome/browser/content_settings/tab_specific_content_settings.h" |
19 #include "chrome/browser/download/download_util.h" | 20 #include "chrome/browser/download/download_util.h" |
20 #include "chrome/browser/extensions/extension_info_map.h" | 21 #include "chrome/browser/extensions/extension_info_map.h" |
21 #include "chrome/browser/extensions/extension_message_handler.h" | 22 #include "chrome/browser/extensions/extension_message_handler.h" |
22 #include "chrome/browser/extensions/extension_service.h" | 23 #include "chrome/browser/extensions/extension_service.h" |
23 #include "chrome/browser/extensions/extension_web_ui.h" | 24 #include "chrome/browser/extensions/extension_web_ui.h" |
24 #include "chrome/browser/extensions/extension_webrequest_api.h" | 25 #include "chrome/browser/extensions/extension_webrequest_api.h" |
25 #include "chrome/browser/geolocation/chrome_access_token_store.h" | 26 #include "chrome/browser/geolocation/chrome_access_token_store.h" |
26 #include "chrome/browser/google/google_util.h" | 27 #include "chrome/browser/google/google_util.h" |
(...skipping 258 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
285 host->channel()->AddFilter( | 286 host->channel()->AddFilter( |
286 new SearchProviderInstallStateMessageFilter(id, profile)); | 287 new SearchProviderInstallStateMessageFilter(id, profile)); |
287 host->channel()->AddFilter(new SpellCheckMessageFilter(id)); | 288 host->channel()->AddFilter(new SpellCheckMessageFilter(id)); |
288 host->channel()->AddFilter(new ChromeBenchmarkingMessageFilter( | 289 host->channel()->AddFilter(new ChromeBenchmarkingMessageFilter( |
289 id, profile, profile->GetRequestContextForRenderProcess(id))); | 290 id, profile, profile->GetRequestContextForRenderProcess(id))); |
290 | 291 |
291 host->Send(new ChromeViewMsg_SetIsIncognitoProcess( | 292 host->Send(new ChromeViewMsg_SetIsIncognitoProcess( |
292 profile->IsOffTheRecord())); | 293 profile->IsOffTheRecord())); |
293 | 294 |
294 SendExtensionWebRequestStatusToHost(host); | 295 SendExtensionWebRequestStatusToHost(host); |
295 ContentSettingsForOneType settings; | 296 |
296 HostContentSettingsMap* map = profile->GetHostContentSettingsMap(); | 297 RendererContentSettingRules rules; |
297 map->GetSettingsForOneType(CONTENT_SETTINGS_TYPE_IMAGES, "", &settings); | 298 GetRendererContentSettingRules(profile->GetHostContentSettingsMap(), &rules); |
298 host->Send(new ChromeViewMsg_SetImageSettingRules(settings)); | 299 host->Send(new ChromeViewMsg_SetContentSettingRules(rules)); |
299 } | 300 } |
300 | 301 |
301 void ChromeContentBrowserClient::PluginProcessHostCreated( | 302 void ChromeContentBrowserClient::PluginProcessHostCreated( |
302 PluginProcessHost* host) { | 303 PluginProcessHost* host) { |
303 host->AddFilter(new ChromePluginMessageFilter(host)); | 304 host->AddFilter(new ChromePluginMessageFilter(host)); |
304 } | 305 } |
305 | 306 |
306 void ChromeContentBrowserClient::WorkerProcessHostCreated( | 307 void ChromeContentBrowserClient::WorkerProcessHostCreated( |
307 WorkerProcessHost* host) { | 308 WorkerProcessHost* host) { |
308 host->AddFilter(new ChromeWorkerMessageFilter(host)); | 309 host->AddFilter(new ChromeWorkerMessageFilter(host)); |
(...skipping 681 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
990 #if defined(USE_NSS) | 991 #if defined(USE_NSS) |
991 crypto::CryptoModuleBlockingPasswordDelegate* | 992 crypto::CryptoModuleBlockingPasswordDelegate* |
992 ChromeContentBrowserClient::GetCryptoPasswordDelegate( | 993 ChromeContentBrowserClient::GetCryptoPasswordDelegate( |
993 const GURL& url) { | 994 const GURL& url) { |
994 return browser::NewCryptoModuleBlockingDialogDelegate( | 995 return browser::NewCryptoModuleBlockingDialogDelegate( |
995 browser::kCryptoModulePasswordKeygen, url.host()); | 996 browser::kCryptoModulePasswordKeygen, url.host()); |
996 } | 997 } |
997 #endif | 998 #endif |
998 | 999 |
999 } // namespace chrome | 1000 } // namespace chrome |
OLD | NEW |