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

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

Issue 901573003: Split ExtensionMessageFilter up into a UI thread part and an IO thread part. (Closed) Base URL: https://chromium.googlesource.com/chromium/src@master
Patch Set: review Created 5 years, 10 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
« no previous file with comments | « no previous file | extensions/browser/BUILD.gn » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 18 matching lines...) Expand all
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/guest_view_message_filter.h" 37 #include "extensions/browser/guest_view/guest_view_message_filter.h"
38 #include "extensions/browser/info_map.h" 38 #include "extensions/browser/info_map.h"
39 #include "extensions/browser/io_thread_extension_message_filter.h"
39 #include "extensions/browser/view_type_utils.h" 40 #include "extensions/browser/view_type_utils.h"
40 #include "extensions/common/constants.h" 41 #include "extensions/common/constants.h"
41 #include "extensions/common/manifest_handlers/background_info.h" 42 #include "extensions/common/manifest_handlers/background_info.h"
42 #include "extensions/common/manifest_handlers/web_accessible_resources_info.h" 43 #include "extensions/common/manifest_handlers/web_accessible_resources_info.h"
43 #include "extensions/common/switches.h" 44 #include "extensions/common/switches.h"
44 45
45 using content::BrowserContext; 46 using content::BrowserContext;
46 using content::BrowserThread; 47 using content::BrowserThread;
47 using content::BrowserURLHandler; 48 using content::BrowserURLHandler;
48 using content::RenderViewHost; 49 using content::RenderViewHost;
(...skipping 337 matching lines...) Expand 10 before | Expand all | Expand 10 after
386 site_instance->GetProcess()->GetID())); 387 site_instance->GetProcess()->GetID()));
387 } 388 }
388 389
389 void ChromeContentBrowserClientExtensionsPart::RenderProcessWillLaunch( 390 void ChromeContentBrowserClientExtensionsPart::RenderProcessWillLaunch(
390 content::RenderProcessHost* host) { 391 content::RenderProcessHost* host) {
391 int id = host->GetID(); 392 int id = host->GetID();
392 Profile* profile = Profile::FromBrowserContext(host->GetBrowserContext()); 393 Profile* profile = Profile::FromBrowserContext(host->GetBrowserContext());
393 394
394 host->AddFilter(new ChromeExtensionMessageFilter(id, profile)); 395 host->AddFilter(new ChromeExtensionMessageFilter(id, profile));
395 host->AddFilter(new ExtensionMessageFilter(id, profile)); 396 host->AddFilter(new ExtensionMessageFilter(id, profile));
397 host->AddFilter(new IOThreadExtensionMessageFilter(id, profile));
396 host->AddFilter(new GuestViewMessageFilter(id, profile)); 398 host->AddFilter(new GuestViewMessageFilter(id, profile));
397 extension_web_request_api_helpers::SendExtensionWebRequestStatusToHost(host); 399 extension_web_request_api_helpers::SendExtensionWebRequestStatusToHost(host);
398 } 400 }
399 401
400 void ChromeContentBrowserClientExtensionsPart::SiteInstanceGotProcess( 402 void ChromeContentBrowserClientExtensionsPart::SiteInstanceGotProcess(
401 SiteInstance* site_instance) { 403 SiteInstance* site_instance) {
402 BrowserContext* context = site_instance->GetProcess()->GetBrowserContext(); 404 BrowserContext* context = site_instance->GetProcess()->GetBrowserContext();
403 ExtensionRegistry* registry = ExtensionRegistry::Get(context); 405 ExtensionRegistry* registry = ExtensionRegistry::Get(context);
404 if (!registry) 406 if (!registry)
405 return; 407 return;
(...skipping 114 matching lines...) Expand 10 before | Expand all | Expand 10 after
520 command_line->AppendSwitch(::switches::kEnableWebRtcHWH264Encoding); 522 command_line->AppendSwitch(::switches::kEnableWebRtcHWH264Encoding);
521 #endif 523 #endif
522 if (base::CommandLine::ForCurrentProcess()->HasSwitch( 524 if (base::CommandLine::ForCurrentProcess()->HasSwitch(
523 switches::kEnableMojoSerialService)) { 525 switches::kEnableMojoSerialService)) {
524 command_line->AppendSwitch(switches::kEnableMojoSerialService); 526 command_line->AppendSwitch(switches::kEnableMojoSerialService);
525 } 527 }
526 } 528 }
527 } 529 }
528 530
529 } // namespace extensions 531 } // namespace extensions
OLDNEW
« no previous file with comments | « no previous file | extensions/browser/BUILD.gn » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698