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 816 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
827 guest->Attach(embedder_web_contents, extension->id(), extra_params); | 827 guest->Attach(embedder_web_contents, extension->id(), extra_params); |
828 } | 828 } |
829 | 829 |
830 void ChromeContentBrowserClient::RenderProcessHostCreated( | 830 void ChromeContentBrowserClient::RenderProcessHostCreated( |
831 content::RenderProcessHost* host) { | 831 content::RenderProcessHost* host) { |
832 int id = host->GetID(); | 832 int id = host->GetID(); |
833 Profile* profile = Profile::FromBrowserContext(host->GetBrowserContext()); | 833 Profile* profile = Profile::FromBrowserContext(host->GetBrowserContext()); |
834 net::URLRequestContextGetter* context = | 834 net::URLRequestContextGetter* context = |
835 profile->GetRequestContextForRenderProcess(id); | 835 profile->GetRequestContextForRenderProcess(id); |
836 | 836 |
837 host->GetChannel()->AddFilter(new ChromeRenderMessageFilter( | 837 host->AddFilter(new ChromeRenderMessageFilter(id, profile, context)); |
838 id, profile, context)); | |
839 #if defined(ENABLE_PLUGINS) | 838 #if defined(ENABLE_PLUGINS) |
840 host->GetChannel()->AddFilter(new PluginInfoMessageFilter(id, profile)); | 839 host->AddFilter(new PluginInfoMessageFilter(id, profile)); |
841 #endif | 840 #endif |
842 #if defined(ENABLE_PRINTING) | 841 #if defined(ENABLE_PRINTING) |
843 host->GetChannel()->AddFilter(new PrintingMessageFilter(id, profile)); | 842 host->AddFilter(new PrintingMessageFilter(id, profile)); |
844 #endif | 843 #endif |
845 host->GetChannel()->AddFilter( | 844 host->AddFilter(new SearchProviderInstallStateMessageFilter(id, profile)); |
846 new SearchProviderInstallStateMessageFilter(id, profile)); | |
847 #if defined(ENABLE_SPELLCHECK) | 845 #if defined(ENABLE_SPELLCHECK) |
848 host->GetChannel()->AddFilter(new SpellCheckMessageFilter(id)); | 846 host->AddFilter(new SpellCheckMessageFilter(id)); |
849 #endif | 847 #endif |
850 #if defined(OS_MACOSX) | 848 #if defined(OS_MACOSX) |
851 host->GetChannel()->AddFilter(new SpellCheckMessageFilterMac(id)); | 849 host->AddFilter(new SpellCheckMessageFilterMac(id)); |
852 #endif | 850 #endif |
853 host->GetChannel()->AddFilter(new ChromeNetBenchmarkingMessageFilter( | 851 host->AddFilter(new ChromeNetBenchmarkingMessageFilter( |
854 id, profile, context)); | 852 id, profile, context)); |
855 host->GetChannel()->AddFilter( | 853 host->AddFilter(new prerender::PrerenderMessageFilter(id, profile)); |
856 new prerender::PrerenderMessageFilter(id, profile)); | 854 host->AddFilter(new ValidationMessageMessageFilter(id)); |
857 host->GetChannel()->AddFilter(new ValidationMessageMessageFilter(id)); | 855 host->AddFilter(new TtsMessageFilter(id, profile)); |
858 host->GetChannel()->AddFilter(new TtsMessageFilter(id, profile)); | |
859 #if defined(ENABLE_WEBRTC) | 856 #if defined(ENABLE_WEBRTC) |
860 host->GetChannel()->AddFilter(new WebRtcLoggingHandlerHost()); | 857 host->AddFilter(new WebRtcLoggingHandlerHost()); |
861 #endif | 858 #endif |
862 #if !defined(DISABLE_NACL) | 859 #if !defined(DISABLE_NACL) |
863 ExtensionInfoMap* extension_info_map = | 860 ExtensionInfoMap* extension_info_map = |
864 extensions::ExtensionSystem::Get(profile)->info_map(); | 861 extensions::ExtensionSystem::Get(profile)->info_map(); |
865 host->GetChannel()->AddFilter(new NaClHostMessageFilter( | 862 host->AddFilter(new NaClHostMessageFilter( |
866 id, profile->IsOffTheRecord(), | 863 id, profile->IsOffTheRecord(), |
867 profile->GetPath(), extension_info_map, | 864 profile->GetPath(), extension_info_map, |
868 context)); | 865 context)); |
869 #endif | 866 #endif |
870 #if defined(OS_ANDROID) | 867 #if defined(OS_ANDROID) |
871 host->GetChannel()->AddFilter(new EncryptedMediaMessageFilterAndroid()); | 868 host->AddFilter(new EncryptedMediaMessageFilterAndroid()); |
872 #endif | 869 #endif |
873 | 870 |
874 host->Send(new ChromeViewMsg_SetIsIncognitoProcess( | 871 host->Send(new ChromeViewMsg_SetIsIncognitoProcess( |
875 profile->IsOffTheRecord())); | 872 profile->IsOffTheRecord())); |
876 | 873 |
877 SendExtensionWebRequestStatusToHost(host); | 874 SendExtensionWebRequestStatusToHost(host); |
878 | 875 |
879 RendererContentSettingRules rules; | 876 RendererContentSettingRules rules; |
880 GetRendererContentSettingRules(profile->GetHostContentSettingsMap(), &rules); | 877 GetRendererContentSettingRules(profile->GetHostContentSettingsMap(), &rules); |
881 host->Send(new ChromeViewMsg_SetContentSettingRules(rules)); | 878 host->Send(new ChromeViewMsg_SetContentSettingRules(rules)); |
(...skipping 1664 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2546 #if defined(USE_NSS) | 2543 #if defined(USE_NSS) |
2547 crypto::CryptoModuleBlockingPasswordDelegate* | 2544 crypto::CryptoModuleBlockingPasswordDelegate* |
2548 ChromeContentBrowserClient::GetCryptoPasswordDelegate( | 2545 ChromeContentBrowserClient::GetCryptoPasswordDelegate( |
2549 const GURL& url) { | 2546 const GURL& url) { |
2550 return chrome::NewCryptoModuleBlockingDialogDelegate( | 2547 return chrome::NewCryptoModuleBlockingDialogDelegate( |
2551 chrome::kCryptoModulePasswordKeygen, url.host()); | 2548 chrome::kCryptoModulePasswordKeygen, url.host()); |
2552 } | 2549 } |
2553 #endif | 2550 #endif |
2554 | 2551 |
2555 } // namespace chrome | 2552 } // namespace chrome |
OLD | NEW |