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 "chrome/browser/browser_process.h" | |
9 #include "chrome/browser/component_updater/pnacl/pnacl_component_installer.h" | |
8 #include "chrome/browser/nacl_host/nacl_infobar_delegate.h" | 10 #include "chrome/browser/nacl_host/nacl_infobar_delegate.h" |
9 #include "chrome/browser/renderer_host/pepper/chrome_browser_pepper_host_factory .h" | 11 #include "chrome/browser/renderer_host/pepper/chrome_browser_pepper_host_factory .h" |
10 #include "chrome/common/chrome_paths.h" | 12 #include "chrome/common/chrome_paths.h" |
11 #include "chrome/common/chrome_paths_internal.h" | 13 #include "chrome/common/chrome_paths_internal.h" |
12 #include "chrome/common/chrome_version_info.h" | 14 #include "chrome/common/chrome_version_info.h" |
13 #include "chrome/common/logging_chrome.h" | 15 #include "chrome/common/logging_chrome.h" |
14 #include "content/public/browser/browser_thread.h" | 16 #include "content/public/browser/browser_thread.h" |
15 #include "ppapi/c/private/ppb_nacl_private.h" | 17 #include "ppapi/c/private/ppb_nacl_private.h" |
16 | 18 |
17 void NaClBrowserDelegateImpl::ShowNaClInfobar(int render_process_id, | 19 void NaClBrowserDelegateImpl::ShowNaClInfobar(int render_process_id, |
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
49 } | 51 } |
50 | 52 |
51 std::string NaClBrowserDelegateImpl::GetVersionString() const { | 53 std::string NaClBrowserDelegateImpl::GetVersionString() const { |
52 return chrome::VersionInfo().CreateVersionString(); | 54 return chrome::VersionInfo().CreateVersionString(); |
53 } | 55 } |
54 | 56 |
55 ppapi::host::HostFactory* NaClBrowserDelegateImpl::CreatePpapiHostFactory( | 57 ppapi::host::HostFactory* NaClBrowserDelegateImpl::CreatePpapiHostFactory( |
56 content::BrowserPpapiHost* ppapi_host) { | 58 content::BrowserPpapiHost* ppapi_host) { |
57 return new chrome::ChromeBrowserPepperHostFactory(ppapi_host); | 59 return new chrome::ChromeBrowserPepperHostFactory(ppapi_host); |
58 } | 60 } |
61 | |
62 void NaClBrowserDelegateImpl::TryInstallPnacl( | |
63 const base::Callback<void(bool)>& installed) { | |
64 ComponentUpdateService* cus = g_browser_process->component_updater(); | |
65 PnaclComponentInstaller* pci = | |
66 g_browser_process->pnacl_component_installer(); | |
67 if (cus && pci) | |
68 RequestFirstInstall(cus, pci, installed); | |
Derek Schuff
2013/07/23 21:39:29
maybe for another CL, but is there any reason this
jvoung (off chromium)
2013/07/31 21:41:07
Ah yes... moving out of global namespace in a sepa
| |
69 else | |
70 installed.Run(false); | |
71 } | |
OLD | NEW |