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

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

Issue 1880933002: Begin to enable extension APIs in Extension Service Worker. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 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 <stddef.h> 7 #include <stddef.h>
8 8
9 #include <set> 9 #include <set>
10 10
(...skipping 17 matching lines...) Expand all
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
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
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
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/extensions/chrome_extension_function.cc » ('j') | extensions/browser/extension_function.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698