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

Side by Side Diff: chrome/browser/extensions/chrome_content_browser_client_extensions_part.cc

Issue 1092853002: GuestView: Decouple extension IPCs from soon-to-be component IPCs (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@move_guest_view_registry_to_guest_view_manager
Patch Set: Updated Created 5 years, 8 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
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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/extensions/chrome_content_browser_client_extensions_par t.h" 5 #include "chrome/browser/extensions/chrome_content_browser_client_extensions_par t.h"
6 6
7 #include <set> 7 #include <set>
8 8
9 #include "base/command_line.h" 9 #include "base/command_line.h"
10 #include "chrome/browser/browser_process.h" 10 #include "chrome/browser/browser_process.h"
(...skipping 16 matching lines...) Expand all
27 #include "content/public/browser/render_view_host.h" 27 #include "content/public/browser/render_view_host.h"
28 #include "content/public/browser/site_instance.h" 28 #include "content/public/browser/site_instance.h"
29 #include "content/public/browser/web_contents.h" 29 #include "content/public/browser/web_contents.h"
30 #include "content/public/common/content_switches.h" 30 #include "content/public/common/content_switches.h"
31 #include "extensions/browser/api/web_request/web_request_api.h" 31 #include "extensions/browser/api/web_request/web_request_api.h"
32 #include "extensions/browser/api/web_request/web_request_api_helpers.h" 32 #include "extensions/browser/api/web_request/web_request_api_helpers.h"
33 #include "extensions/browser/extension_host.h" 33 #include "extensions/browser/extension_host.h"
34 #include "extensions/browser/extension_message_filter.h" 34 #include "extensions/browser/extension_message_filter.h"
35 #include "extensions/browser/extension_registry.h" 35 #include "extensions/browser/extension_registry.h"
36 #include "extensions/browser/extension_system.h" 36 #include "extensions/browser/extension_system.h"
37 #include "extensions/browser/guest_view/extensions_guest_view_message_filter.h"
37 #include "extensions/browser/guest_view/guest_view_message_filter.h" 38 #include "extensions/browser/guest_view/guest_view_message_filter.h"
38 #include "extensions/browser/info_map.h" 39 #include "extensions/browser/info_map.h"
39 #include "extensions/browser/io_thread_extension_message_filter.h" 40 #include "extensions/browser/io_thread_extension_message_filter.h"
40 #include "extensions/browser/view_type_utils.h" 41 #include "extensions/browser/view_type_utils.h"
41 #include "extensions/common/constants.h" 42 #include "extensions/common/constants.h"
42 #include "extensions/common/manifest_handlers/background_info.h" 43 #include "extensions/common/manifest_handlers/background_info.h"
43 #include "extensions/common/manifest_handlers/web_accessible_resources_info.h" 44 #include "extensions/common/manifest_handlers/web_accessible_resources_info.h"
44 #include "extensions/common/switches.h" 45 #include "extensions/common/switches.h"
45 46
46 using content::BrowserContext; 47 using content::BrowserContext;
(...skipping 324 matching lines...) Expand 10 before | Expand all | Expand 10 after
371 } 372 }
372 373
373 void ChromeContentBrowserClientExtensionsPart::RenderProcessWillLaunch( 374 void ChromeContentBrowserClientExtensionsPart::RenderProcessWillLaunch(
374 content::RenderProcessHost* host) { 375 content::RenderProcessHost* host) {
375 int id = host->GetID(); 376 int id = host->GetID();
376 Profile* profile = Profile::FromBrowserContext(host->GetBrowserContext()); 377 Profile* profile = Profile::FromBrowserContext(host->GetBrowserContext());
377 378
378 host->AddFilter(new ChromeExtensionMessageFilter(id, profile)); 379 host->AddFilter(new ChromeExtensionMessageFilter(id, profile));
379 host->AddFilter(new ExtensionMessageFilter(id, profile)); 380 host->AddFilter(new ExtensionMessageFilter(id, profile));
380 host->AddFilter(new IOThreadExtensionMessageFilter(id, profile)); 381 host->AddFilter(new IOThreadExtensionMessageFilter(id, profile));
382 host->AddFilter(new ExtensionsGuestViewMessageFilter(id, profile));
381 host->AddFilter(new GuestViewMessageFilter(id, profile)); 383 host->AddFilter(new GuestViewMessageFilter(id, profile));
382 extension_web_request_api_helpers::SendExtensionWebRequestStatusToHost(host); 384 extension_web_request_api_helpers::SendExtensionWebRequestStatusToHost(host);
383 } 385 }
384 386
385 void ChromeContentBrowserClientExtensionsPart::SiteInstanceGotProcess( 387 void ChromeContentBrowserClientExtensionsPart::SiteInstanceGotProcess(
386 SiteInstance* site_instance) { 388 SiteInstance* site_instance) {
387 BrowserContext* context = site_instance->GetProcess()->GetBrowserContext(); 389 BrowserContext* context = site_instance->GetProcess()->GetBrowserContext();
388 ExtensionRegistry* registry = ExtensionRegistry::Get(context); 390 ExtensionRegistry* registry = ExtensionRegistry::Get(context);
389 if (!registry) 391 if (!registry)
390 return; 392 return;
(...skipping 113 matching lines...) Expand 10 before | Expand all | Expand 10 after
504 command_line->AppendSwitch(::switches::kEnableWebRtcHWH264Encoding); 506 command_line->AppendSwitch(::switches::kEnableWebRtcHWH264Encoding);
505 #endif 507 #endif
506 if (base::CommandLine::ForCurrentProcess()->HasSwitch( 508 if (base::CommandLine::ForCurrentProcess()->HasSwitch(
507 switches::kEnableMojoSerialService)) { 509 switches::kEnableMojoSerialService)) {
508 command_line->AppendSwitch(switches::kEnableMojoSerialService); 510 command_line->AppendSwitch(switches::kEnableMojoSerialService);
509 } 511 }
510 } 512 }
511 } 513 }
512 514
513 } // namespace extensions 515 } // namespace extensions
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698