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 16 matching lines...) Expand all Loading... |
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/guest_view_message_filter.h" |
37 #include "extensions/browser/info_map.h" | 38 #include "extensions/browser/info_map.h" |
38 #include "extensions/browser/view_type_utils.h" | 39 #include "extensions/browser/view_type_utils.h" |
39 #include "extensions/common/constants.h" | 40 #include "extensions/common/constants.h" |
40 #include "extensions/common/manifest_handlers/background_info.h" | 41 #include "extensions/common/manifest_handlers/background_info.h" |
41 #include "extensions/common/manifest_handlers/web_accessible_resources_info.h" | 42 #include "extensions/common/manifest_handlers/web_accessible_resources_info.h" |
42 #include "extensions/common/switches.h" | 43 #include "extensions/common/switches.h" |
43 | 44 |
44 using content::BrowserContext; | 45 using content::BrowserContext; |
45 using content::BrowserThread; | 46 using content::BrowserThread; |
46 using content::BrowserURLHandler; | 47 using content::BrowserURLHandler; |
(...skipping 338 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
385 site_instance->GetProcess()->GetID())); | 386 site_instance->GetProcess()->GetID())); |
386 } | 387 } |
387 | 388 |
388 void ChromeContentBrowserClientExtensionsPart::RenderProcessWillLaunch( | 389 void ChromeContentBrowserClientExtensionsPart::RenderProcessWillLaunch( |
389 content::RenderProcessHost* host) { | 390 content::RenderProcessHost* host) { |
390 int id = host->GetID(); | 391 int id = host->GetID(); |
391 Profile* profile = Profile::FromBrowserContext(host->GetBrowserContext()); | 392 Profile* profile = Profile::FromBrowserContext(host->GetBrowserContext()); |
392 | 393 |
393 host->AddFilter(new ChromeExtensionMessageFilter(id, profile)); | 394 host->AddFilter(new ChromeExtensionMessageFilter(id, profile)); |
394 host->AddFilter(new ExtensionMessageFilter(id, profile)); | 395 host->AddFilter(new ExtensionMessageFilter(id, profile)); |
| 396 host->AddFilter(new GuestViewMessageFilter(id, profile)); |
395 extension_web_request_api_helpers::SendExtensionWebRequestStatusToHost(host); | 397 extension_web_request_api_helpers::SendExtensionWebRequestStatusToHost(host); |
396 } | 398 } |
397 | 399 |
398 void ChromeContentBrowserClientExtensionsPart::SiteInstanceGotProcess( | 400 void ChromeContentBrowserClientExtensionsPart::SiteInstanceGotProcess( |
399 SiteInstance* site_instance) { | 401 SiteInstance* site_instance) { |
400 BrowserContext* context = site_instance->GetProcess()->GetBrowserContext(); | 402 BrowserContext* context = site_instance->GetProcess()->GetBrowserContext(); |
401 ExtensionRegistry* registry = ExtensionRegistry::Get(context); | 403 ExtensionRegistry* registry = ExtensionRegistry::Get(context); |
402 if (!registry) | 404 if (!registry) |
403 return; | 405 return; |
404 | 406 |
(...skipping 113 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
518 command_line->AppendSwitch(::switches::kEnableWebRtcHWH264Encoding); | 520 command_line->AppendSwitch(::switches::kEnableWebRtcHWH264Encoding); |
519 #endif | 521 #endif |
520 if (base::CommandLine::ForCurrentProcess()->HasSwitch( | 522 if (base::CommandLine::ForCurrentProcess()->HasSwitch( |
521 switches::kEnableMojoSerialService)) { | 523 switches::kEnableMojoSerialService)) { |
522 command_line->AppendSwitch(switches::kEnableMojoSerialService); | 524 command_line->AppendSwitch(switches::kEnableMojoSerialService); |
523 } | 525 } |
524 } | 526 } |
525 } | 527 } |
526 | 528 |
527 } // namespace extensions | 529 } // namespace extensions |
OLD | NEW |