OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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/nacl_host/nacl_browser_delegate_impl.h" | 5 #include "chrome/browser/nacl_host/nacl_browser_delegate_impl.h" |
6 | 6 |
7 #include "base/path_service.h" | 7 #include "base/path_service.h" |
8 #include "base/strings/string_split.h" | 8 #include "base/strings/string_split.h" |
9 #include "base/strings/string_util.h" | 9 #include "base/strings/string_util.h" |
10 #include "chrome/browser/browser_process.h" | 10 #include "chrome/browser/browser_process.h" |
11 #include "chrome/browser/component_updater/pnacl/pnacl_component_installer.h" | 11 #include "chrome/browser/component_updater/pnacl/pnacl_component_installer.h" |
12 #include "chrome/browser/extensions/extension_service.h" | 12 #include "chrome/browser/extensions/extension_service.h" |
13 #include "chrome/browser/extensions/extension_system.h" | |
14 #include "chrome/browser/nacl_host/nacl_infobar_delegate.h" | 13 #include "chrome/browser/nacl_host/nacl_infobar_delegate.h" |
15 #include "chrome/browser/profiles/profile.h" | 14 #include "chrome/browser/profiles/profile.h" |
16 #include "chrome/browser/renderer_host/pepper/chrome_browser_pepper_host_factory
.h" | 15 #include "chrome/browser/renderer_host/pepper/chrome_browser_pepper_host_factory
.h" |
17 #include "chrome/common/chrome_paths.h" | 16 #include "chrome/common/chrome_paths.h" |
18 #include "chrome/common/chrome_paths_internal.h" | 17 #include "chrome/common/chrome_paths_internal.h" |
19 #include "chrome/common/chrome_version_info.h" | 18 #include "chrome/common/chrome_version_info.h" |
20 #include "chrome/common/logging_chrome.h" | 19 #include "chrome/common/logging_chrome.h" |
21 #include "content/public/browser/browser_thread.h" | 20 #include "content/public/browser/browser_thread.h" |
22 #include "content/public/browser/render_frame_host.h" | 21 #include "content/public/browser/render_frame_host.h" |
23 #include "content/public/browser/site_instance.h" | 22 #include "content/public/browser/site_instance.h" |
| 23 #include "extensions/browser/extension_system.h" |
24 #include "extensions/browser/info_map.h" | 24 #include "extensions/browser/info_map.h" |
25 #include "extensions/browser/process_manager.h" | 25 #include "extensions/browser/process_manager.h" |
26 #include "extensions/common/constants.h" | 26 #include "extensions/common/constants.h" |
27 #include "extensions/common/extension.h" | 27 #include "extensions/common/extension.h" |
28 #include "extensions/common/manifest_handlers/shared_module_info.h" | 28 #include "extensions/common/manifest_handlers/shared_module_info.h" |
29 #include "extensions/common/url_pattern.h" | 29 #include "extensions/common/url_pattern.h" |
30 #include "ppapi/c/private/ppb_nacl_private.h" | 30 #include "ppapi/c/private/ppb_nacl_private.h" |
31 | 31 |
32 using extensions::SharedModuleInfo; | 32 using extensions::SharedModuleInfo; |
33 | 33 |
(...skipping 28 matching lines...) Expand all Loading... |
62 content::RenderFrameHost::FromID( | 62 content::RenderFrameHost::FromID( |
63 instance_data[0].render_process_id, instance_data[0].render_frame_id); | 63 instance_data[0].render_process_id, instance_data[0].render_frame_id); |
64 if (!render_frame_host) | 64 if (!render_frame_host) |
65 return; | 65 return; |
66 | 66 |
67 content::SiteInstance* site_instance = render_frame_host->GetSiteInstance(); | 67 content::SiteInstance* site_instance = render_frame_host->GetSiteInstance(); |
68 if (!site_instance) | 68 if (!site_instance) |
69 return; | 69 return; |
70 | 70 |
71 extensions::ExtensionSystem* extension_system = | 71 extensions::ExtensionSystem* extension_system = |
72 extensions::ExtensionSystem::GetForBrowserContext( | 72 extensions::ExtensionSystem::Get(site_instance->GetBrowserContext()); |
73 site_instance->GetBrowserContext()); | |
74 if (!extension_system) | 73 if (!extension_system) |
75 return; | 74 return; |
76 | 75 |
77 const ExtensionService* extension_service = | 76 const ExtensionService* extension_service = |
78 extension_system->extension_service(); | 77 extension_system->extension_service(); |
79 if (!extension_service) | 78 if (!extension_service) |
80 return; | 79 return; |
81 | 80 |
82 const extensions::Extension* extension = extension_service->GetExtensionById( | 81 const extensions::Extension* extension = extension_service->GetExtensionById( |
83 instance_data[0].document_url.host(), false); | 82 instance_data[0].document_url.host(), false); |
(...skipping 173 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
257 return false; | 256 return false; |
258 | 257 |
259 *file_path = resource_file_path; | 258 *file_path = resource_file_path; |
260 return true; | 259 return true; |
261 } | 260 } |
262 | 261 |
263 content::BrowserPpapiHost::OnKeepaliveCallback | 262 content::BrowserPpapiHost::OnKeepaliveCallback |
264 NaClBrowserDelegateImpl::GetOnKeepaliveCallback() { | 263 NaClBrowserDelegateImpl::GetOnKeepaliveCallback() { |
265 return base::Bind(&OnKeepalive); | 264 return base::Bind(&OnKeepalive); |
266 } | 265 } |
OLD | NEW |