OLD | NEW |
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 Loading... |
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 Loading... |
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 Loading... |
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 |
OLD | NEW |