| 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 <stddef.h> | 7 #include <stddef.h> |
| 8 | 8 |
| 9 #include <set> | 9 #include <set> |
| 10 | 10 |
| (...skipping 17 matching lines...) Expand all Loading... |
| 28 #include "content/public/browser/render_process_host.h" | 28 #include "content/public/browser/render_process_host.h" |
| 29 #include "content/public/browser/render_view_host.h" | 29 #include "content/public/browser/render_view_host.h" |
| 30 #include "content/public/browser/site_instance.h" | 30 #include "content/public/browser/site_instance.h" |
| 31 #include "content/public/browser/web_contents.h" | 31 #include "content/public/browser/web_contents.h" |
| 32 #include "content/public/common/content_switches.h" | 32 #include "content/public/common/content_switches.h" |
| 33 #include "extensions/browser/api/web_request/web_request_api.h" | 33 #include "extensions/browser/api/web_request/web_request_api.h" |
| 34 #include "extensions/browser/api/web_request/web_request_api_helpers.h" | 34 #include "extensions/browser/api/web_request/web_request_api_helpers.h" |
| 35 #include "extensions/browser/extension_host.h" | 35 #include "extensions/browser/extension_host.h" |
| 36 #include "extensions/browser/extension_message_filter.h" | 36 #include "extensions/browser/extension_message_filter.h" |
| 37 #include "extensions/browser/extension_registry.h" | 37 #include "extensions/browser/extension_registry.h" |
| 38 #include "extensions/browser/extension_service_worker_message_filter.h" |
| 38 #include "extensions/browser/extension_system.h" | 39 #include "extensions/browser/extension_system.h" |
| 39 #include "extensions/browser/guest_view/extensions_guest_view_message_filter.h" | 40 #include "extensions/browser/guest_view/extensions_guest_view_message_filter.h" |
| 40 #include "extensions/browser/guest_view/web_view/web_view_renderer_state.h" | 41 #include "extensions/browser/guest_view/web_view/web_view_renderer_state.h" |
| 41 #include "extensions/browser/info_map.h" | 42 #include "extensions/browser/info_map.h" |
| 42 #include "extensions/browser/io_thread_extension_message_filter.h" | 43 #include "extensions/browser/io_thread_extension_message_filter.h" |
| 43 #include "extensions/browser/view_type_utils.h" | 44 #include "extensions/browser/view_type_utils.h" |
| 44 #include "extensions/common/constants.h" | 45 #include "extensions/common/constants.h" |
| 45 #include "extensions/common/manifest_constants.h" | 46 #include "extensions/common/manifest_constants.h" |
| 46 #include "extensions/common/manifest_handlers/app_isolation_info.h" | 47 #include "extensions/common/manifest_handlers/app_isolation_info.h" |
| 47 #include "extensions/common/manifest_handlers/background_info.h" | 48 #include "extensions/common/manifest_handlers/background_info.h" |
| (...skipping 441 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 489 | 490 |
| 490 void ChromeContentBrowserClientExtensionsPart::RenderProcessWillLaunch( | 491 void ChromeContentBrowserClientExtensionsPart::RenderProcessWillLaunch( |
| 491 content::RenderProcessHost* host) { | 492 content::RenderProcessHost* host) { |
| 492 int id = host->GetID(); | 493 int id = host->GetID(); |
| 493 Profile* profile = Profile::FromBrowserContext(host->GetBrowserContext()); | 494 Profile* profile = Profile::FromBrowserContext(host->GetBrowserContext()); |
| 494 | 495 |
| 495 host->AddFilter(new ChromeExtensionMessageFilter(id, profile)); | 496 host->AddFilter(new ChromeExtensionMessageFilter(id, profile)); |
| 496 host->AddFilter(new ExtensionMessageFilter(id, profile)); | 497 host->AddFilter(new ExtensionMessageFilter(id, profile)); |
| 497 host->AddFilter(new IOThreadExtensionMessageFilter(id, profile)); | 498 host->AddFilter(new IOThreadExtensionMessageFilter(id, profile)); |
| 498 host->AddFilter(new ExtensionsGuestViewMessageFilter(id, profile)); | 499 host->AddFilter(new ExtensionsGuestViewMessageFilter(id, profile)); |
| 500 host->AddFilter(new ExtensionServiceWorkerMessageFilter(id, profile)); |
| 499 extension_web_request_api_helpers::SendExtensionWebRequestStatusToHost(host); | 501 extension_web_request_api_helpers::SendExtensionWebRequestStatusToHost(host); |
| 500 } | 502 } |
| 501 | 503 |
| 502 void ChromeContentBrowserClientExtensionsPart::SiteInstanceGotProcess( | 504 void ChromeContentBrowserClientExtensionsPart::SiteInstanceGotProcess( |
| 503 SiteInstance* site_instance) { | 505 SiteInstance* site_instance) { |
| 504 BrowserContext* context = site_instance->GetProcess()->GetBrowserContext(); | 506 BrowserContext* context = site_instance->GetProcess()->GetBrowserContext(); |
| 505 ExtensionRegistry* registry = ExtensionRegistry::Get(context); | 507 ExtensionRegistry* registry = ExtensionRegistry::Get(context); |
| 506 if (!registry) | 508 if (!registry) |
| 507 return; | 509 return; |
| 508 | 510 |
| (...skipping 112 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 621 command_line->AppendSwitch(::switches::kEnableWebRtcHWH264Encoding); | 623 command_line->AppendSwitch(::switches::kEnableWebRtcHWH264Encoding); |
| 622 #endif | 624 #endif |
| 623 if (base::CommandLine::ForCurrentProcess()->HasSwitch( | 625 if (base::CommandLine::ForCurrentProcess()->HasSwitch( |
| 624 switches::kEnableMojoSerialService)) { | 626 switches::kEnableMojoSerialService)) { |
| 625 command_line->AppendSwitch(switches::kEnableMojoSerialService); | 627 command_line->AppendSwitch(switches::kEnableMojoSerialService); |
| 626 } | 628 } |
| 627 } | 629 } |
| 628 } | 630 } |
| 629 | 631 |
| 630 } // namespace extensions | 632 } // namespace extensions |
| OLD | NEW |