Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(456)

Side by Side Diff: chrome/browser/chrome_content_browser_client.cc

Issue 306233002: Split most extensions bits in ChromeRenderMessageFilter into ChromeExtensionMessageFilter. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: remove more cruft Created 6 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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 174 matching lines...) Expand 10 before | Expand all | Expand 10 after
185 #elif defined(OS_POSIX) 185 #elif defined(OS_POSIX)
186 #include "chrome/browser/chrome_browser_main_posix.h" 186 #include "chrome/browser/chrome_browser_main_posix.h"
187 #endif 187 #endif
188 188
189 #if defined(OS_POSIX) && !defined(OS_MACOSX) 189 #if defined(OS_POSIX) && !defined(OS_MACOSX)
190 #include "base/debug/leak_annotations.h" 190 #include "base/debug/leak_annotations.h"
191 #include "components/breakpad/app/breakpad_linux.h" 191 #include "components/breakpad/app/breakpad_linux.h"
192 #include "components/breakpad/browser/crash_handler_host_linux.h" 192 #include "components/breakpad/browser/crash_handler_host_linux.h"
193 #endif 193 #endif
194 194
195 #if defined(ENABLE_CAPTIVE_PORTAL_DETECTION)
196 #include "chrome/browser/captive_portal/captive_portal_tab_helper.h"
197 #endif
198
199 #if defined(OS_ANDROID) 195 #if defined(OS_ANDROID)
200 #include "ui/base/ui_base_paths.h" 196 #include "ui/base/ui_base_paths.h"
201 #include "ui/gfx/android/device_display_info.h" 197 #include "ui/gfx/android/device_display_info.h"
198 #else
199 #include "chrome/browser/media_galleries/fileapi/media_file_system_backend.h"
202 #endif 200 #endif
203 201
204 #if !defined(OS_CHROMEOS) 202 #if !defined(OS_CHROMEOS)
205 #include "chrome/browser/signin/chrome_signin_client.h" 203 #include "chrome/browser/signin/chrome_signin_client.h"
206 #include "chrome/browser/signin/chrome_signin_client_factory.h" 204 #include "chrome/browser/signin/chrome_signin_client_factory.h"
207 #include "chrome/browser/signin/signin_manager_factory.h" 205 #include "chrome/browser/signin/signin_manager_factory.h"
208 #include "components/signin/core/browser/signin_manager.h" 206 #include "components/signin/core/browser/signin_manager.h"
209 #endif 207 #endif
210 208
211 #if !defined(OS_ANDROID)
212 #include "chrome/browser/media_galleries/fileapi/media_file_system_backend.h"
213 #endif
214
215 #if defined(ENABLE_WEBRTC)
216 #include "chrome/browser/media/webrtc_logging_handler_host.h"
217 #endif
218
219 #if defined(OS_CHROMEOS) 209 #if defined(OS_CHROMEOS)
220 #include "chrome/browser/chromeos/file_manager/app_id.h" 210 #include "chrome/browser/chromeos/file_manager/app_id.h"
221 #endif 211 #endif
222 212
223 #if defined(TOOLKIT_VIEWS) 213 #if defined(TOOLKIT_VIEWS)
224 #include "chrome/browser/ui/views/chrome_browser_main_extra_parts_views.h" 214 #include "chrome/browser/ui/views/chrome_browser_main_extra_parts_views.h"
225 #endif 215 #endif
226 216
227 #if defined(USE_ASH) 217 #if defined(USE_ASH)
228 #include "chrome/browser/ui/views/ash/chrome_browser_main_extra_parts_ash.h" 218 #include "chrome/browser/ui/views/ash/chrome_browser_main_extra_parts_ash.h"
229 #endif 219 #endif
230 220
231 #if defined(USE_AURA) 221 #if defined(USE_AURA)
232 #include "chrome/browser/ui/aura/chrome_browser_main_extra_parts_aura.h" 222 #include "chrome/browser/ui/aura/chrome_browser_main_extra_parts_aura.h"
233 #endif 223 #endif
234 224
235 #if defined(USE_X11) 225 #if defined(USE_X11)
236 #include "chrome/browser/chrome_browser_main_extra_parts_x11.h" 226 #include "chrome/browser/chrome_browser_main_extra_parts_x11.h"
237 #endif 227 #endif
238 228
229 #if defined(ENABLE_CAPTIVE_PORTAL_DETECTION)
James Cook 2014/06/03 16:07:15 Thanks for cleaning these up!
230 #include "chrome/browser/captive_portal/captive_portal_tab_helper.h"
231 #endif
232
233 #if defined(ENABLE_EXTENSIONS)
234 #include "chrome/browser/renderer_host/chrome_extension_message_filter.h"
235 #endif
236
239 #if defined(ENABLE_SPELLCHECK) 237 #if defined(ENABLE_SPELLCHECK)
240 #include "chrome/browser/spellchecker/spellcheck_message_filter.h" 238 #include "chrome/browser/spellchecker/spellcheck_message_filter.h"
241 #endif 239 #endif
242 240
243 #if defined(ENABLE_SERVICE_DISCOVERY) 241 #if defined(ENABLE_SERVICE_DISCOVERY)
244 #include "chrome/browser/local_discovery/storage/privet_filesystem_backend.h" 242 #include "chrome/browser/local_discovery/storage/privet_filesystem_backend.h"
245 #endif 243 #endif
246 244
245 #if defined(ENABLE_WEBRTC)
246 #include "chrome/browser/media/webrtc_logging_handler_host.h"
247 #endif
248
247 using blink::WebWindowFeatures; 249 using blink::WebWindowFeatures;
248 using base::FileDescriptor; 250 using base::FileDescriptor;
249 using content::AccessTokenStore; 251 using content::AccessTokenStore;
250 using content::BrowserChildProcessHostIterator; 252 using content::BrowserChildProcessHostIterator;
251 using content::BrowserThread; 253 using content::BrowserThread;
252 using content::BrowserURLHandler; 254 using content::BrowserURLHandler;
253 using content::ChildProcessSecurityPolicy; 255 using content::ChildProcessSecurityPolicy;
254 using content::QuotaPermissionContext; 256 using content::QuotaPermissionContext;
255 using content::RenderFrameHost; 257 using content::RenderFrameHost;
256 using content::RenderViewHost; 258 using content::RenderViewHost;
(...skipping 635 matching lines...) Expand 10 before | Expand all | Expand 10 after
892 guest->Attach(embedder_web_contents, extra_params); 894 guest->Attach(embedder_web_contents, extra_params);
893 } 895 }
894 896
895 void ChromeContentBrowserClient::RenderProcessWillLaunch( 897 void ChromeContentBrowserClient::RenderProcessWillLaunch(
896 content::RenderProcessHost* host) { 898 content::RenderProcessHost* host) {
897 int id = host->GetID(); 899 int id = host->GetID();
898 Profile* profile = Profile::FromBrowserContext(host->GetBrowserContext()); 900 Profile* profile = Profile::FromBrowserContext(host->GetBrowserContext());
899 net::URLRequestContextGetter* context = 901 net::URLRequestContextGetter* context =
900 profile->GetRequestContextForRenderProcess(id); 902 profile->GetRequestContextForRenderProcess(id);
901 903
902 host->AddFilter(new ChromeRenderMessageFilter(id, profile, context)); 904 host->AddFilter(new ChromeRenderMessageFilter(id, profile));
905 #if defined(ENABLE_EXTENSIONS)
906 host->AddFilter(new ChromeExtensionMessageFilter(id, profile));
903 host->AddFilter(new extensions::ExtensionMessageFilter(id, profile)); 907 host->AddFilter(new extensions::ExtensionMessageFilter(id, profile));
908 #endif
904 #if defined(ENABLE_PLUGINS) 909 #if defined(ENABLE_PLUGINS)
905 host->AddFilter(new PluginInfoMessageFilter(id, profile)); 910 host->AddFilter(new PluginInfoMessageFilter(id, profile));
906 #endif 911 #endif
907 host->AddFilter(new cast::CastTransportHostFilter); 912 host->AddFilter(new cast::CastTransportHostFilter);
908 #if defined(ENABLE_PRINTING) 913 #if defined(ENABLE_PRINTING)
909 host->AddFilter(new PrintingMessageFilter(id, profile)); 914 host->AddFilter(new PrintingMessageFilter(id, profile));
910 #endif 915 #endif
911 host->AddFilter(new SearchProviderInstallStateMessageFilter(id, profile)); 916 host->AddFilter(new SearchProviderInstallStateMessageFilter(id, profile));
912 #if defined(ENABLE_SPELLCHECK) 917 #if defined(ENABLE_SPELLCHECK)
913 host->AddFilter(new SpellCheckMessageFilter(id)); 918 host->AddFilter(new SpellCheckMessageFilter(id));
(...skipping 1842 matching lines...) Expand 10 before | Expand all | Expand 10 after
2756 switches::kDisableWebRtcEncryption, 2761 switches::kDisableWebRtcEncryption,
2757 }; 2762 };
2758 to_command_line->CopySwitchesFrom(from_command_line, 2763 to_command_line->CopySwitchesFrom(from_command_line,
2759 kWebRtcDevSwitchNames, 2764 kWebRtcDevSwitchNames,
2760 arraysize(kWebRtcDevSwitchNames)); 2765 arraysize(kWebRtcDevSwitchNames));
2761 } 2766 }
2762 } 2767 }
2763 #endif // defined(ENABLE_WEBRTC) 2768 #endif // defined(ENABLE_WEBRTC)
2764 2769
2765 } // namespace chrome 2770 } // namespace chrome
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698