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