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 <map> | 7 #include <map> |
8 #include <set> | 8 #include <set> |
9 #include <utility> | 9 #include <utility> |
10 #include <vector> | 10 #include <vector> |
(...skipping 949 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
960 return chrome::CreateWebContentsViewDelegate(web_contents); | 960 return chrome::CreateWebContentsViewDelegate(web_contents); |
961 } | 961 } |
962 | 962 |
963 void ChromeContentBrowserClient::RenderProcessWillLaunch( | 963 void ChromeContentBrowserClient::RenderProcessWillLaunch( |
964 content::RenderProcessHost* host) { | 964 content::RenderProcessHost* host) { |
965 int id = host->GetID(); | 965 int id = host->GetID(); |
966 Profile* profile = Profile::FromBrowserContext(host->GetBrowserContext()); | 966 Profile* profile = Profile::FromBrowserContext(host->GetBrowserContext()); |
967 net::URLRequestContextGetter* context = | 967 net::URLRequestContextGetter* context = |
968 host->GetStoragePartition()->GetURLRequestContext(); | 968 host->GetStoragePartition()->GetURLRequestContext(); |
969 | 969 |
970 host->AddFilter(new ChromeRenderMessageFilter(id, profile)); | 970 auto chrome_render = new ChromeRenderMessageFilter(id, profile); |
971 host->GetInterfaceRegistry()->AddInterface( | |
Sam McNally
2016/07/12 05:25:29
I think you want this interface to live on the IO
tibell
2016/07/12 07:14:24
Done.
| |
972 base::Bind(&ChromeRenderMessageFilter::BindNetworkHints, | |
973 base::Unretained(chrome_render))); | |
974 host->AddFilter(chrome_render); | |
971 #if defined(ENABLE_EXTENSIONS) | 975 #if defined(ENABLE_EXTENSIONS) |
972 host->AddFilter(new cast::CastTransportHostFilter); | 976 host->AddFilter(new cast::CastTransportHostFilter); |
973 #endif | 977 #endif |
974 #if defined(ENABLE_PRINTING) | 978 #if defined(ENABLE_PRINTING) |
975 host->AddFilter(new printing::PrintingMessageFilter(id, profile)); | 979 host->AddFilter(new printing::PrintingMessageFilter(id, profile)); |
976 #endif | 980 #endif |
977 host->AddFilter(new SearchProviderInstallStateMessageFilter(id, profile)); | 981 host->AddFilter(new SearchProviderInstallStateMessageFilter(id, profile)); |
978 #if defined(ENABLE_SPELLCHECK) | 982 #if defined(ENABLE_SPELLCHECK) |
979 host->AddFilter(new SpellCheckMessageFilter(id)); | 983 host->AddFilter(new SpellCheckMessageFilter(id)); |
980 #endif | 984 #endif |
(...skipping 2063 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
3044 if (channel <= kMaxDisableEncryptionChannel) { | 3048 if (channel <= kMaxDisableEncryptionChannel) { |
3045 static const char* const kWebRtcDevSwitchNames[] = { | 3049 static const char* const kWebRtcDevSwitchNames[] = { |
3046 switches::kDisableWebRtcEncryption, | 3050 switches::kDisableWebRtcEncryption, |
3047 }; | 3051 }; |
3048 to_command_line->CopySwitchesFrom(from_command_line, | 3052 to_command_line->CopySwitchesFrom(from_command_line, |
3049 kWebRtcDevSwitchNames, | 3053 kWebRtcDevSwitchNames, |
3050 arraysize(kWebRtcDevSwitchNames)); | 3054 arraysize(kWebRtcDevSwitchNames)); |
3051 } | 3055 } |
3052 } | 3056 } |
3053 #endif // defined(ENABLE_WEBRTC) | 3057 #endif // defined(ENABLE_WEBRTC) |
OLD | NEW |