| 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 546 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 557 | 557 |
| 558 host->AddFilter(new ChromeExtensionMessageFilter(id, profile)); | 558 host->AddFilter(new ChromeExtensionMessageFilter(id, profile)); |
| 559 host->AddFilter(new ExtensionMessageFilter(id, profile)); | 559 host->AddFilter(new ExtensionMessageFilter(id, profile)); |
| 560 host->AddFilter(new IOThreadExtensionMessageFilter(id, profile)); | 560 host->AddFilter(new IOThreadExtensionMessageFilter(id, profile)); |
| 561 host->AddFilter(new ExtensionsGuestViewMessageFilter(id, profile)); | 561 host->AddFilter(new ExtensionsGuestViewMessageFilter(id, profile)); |
| 562 if (extensions::ExtensionsClient::Get() | 562 if (extensions::ExtensionsClient::Get() |
| 563 ->ExtensionAPIEnabledInExtensionServiceWorkers()) { | 563 ->ExtensionAPIEnabledInExtensionServiceWorkers()) { |
| 564 host->AddFilter(new ExtensionServiceWorkerMessageFilter( | 564 host->AddFilter(new ExtensionServiceWorkerMessageFilter( |
| 565 id, profile, host->GetStoragePartition()->GetServiceWorkerContext())); | 565 id, profile, host->GetStoragePartition()->GetServiceWorkerContext())); |
| 566 } | 566 } |
| 567 extension_web_request_api_helpers::SendExtensionWebRequestStatusToHost(host); | |
| 568 } | 567 } |
| 569 | 568 |
| 570 void ChromeContentBrowserClientExtensionsPart::SiteInstanceGotProcess( | 569 void ChromeContentBrowserClientExtensionsPart::SiteInstanceGotProcess( |
| 571 SiteInstance* site_instance) { | 570 SiteInstance* site_instance) { |
| 572 BrowserContext* context = site_instance->GetProcess()->GetBrowserContext(); | 571 BrowserContext* context = site_instance->GetProcess()->GetBrowserContext(); |
| 573 ExtensionRegistry* registry = ExtensionRegistry::Get(context); | 572 ExtensionRegistry* registry = ExtensionRegistry::Get(context); |
| 574 if (!registry) | 573 if (!registry) |
| 575 return; | 574 return; |
| 576 | 575 |
| 577 const Extension* extension = | 576 const Extension* extension = |
| (...skipping 109 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 687 command_line->AppendSwitch(switches::kExtensionProcess); | 686 command_line->AppendSwitch(switches::kExtensionProcess); |
| 688 } | 687 } |
| 689 } | 688 } |
| 690 | 689 |
| 691 void ChromeContentBrowserClientExtensionsPart::ResourceDispatcherHostCreated() { | 690 void ChromeContentBrowserClientExtensionsPart::ResourceDispatcherHostCreated() { |
| 692 content::ResourceDispatcherHost::Get()->RegisterInterceptor( | 691 content::ResourceDispatcherHost::Get()->RegisterInterceptor( |
| 693 "Origin", kExtensionScheme, base::Bind(&OnHttpHeaderReceived)); | 692 "Origin", kExtensionScheme, base::Bind(&OnHttpHeaderReceived)); |
| 694 } | 693 } |
| 695 | 694 |
| 696 } // namespace extensions | 695 } // namespace extensions |
| OLD | NEW |