| 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 #ifndef COMPONENTS_NACL_COMMON_NACL_BROWSER_DELEGATE_H_ | 5 #ifndef COMPONENTS_NACL_COMMON_NACL_BROWSER_DELEGATE_H_ |
| 6 #define COMPONENTS_NACL_COMMON_NACL_BROWSER_DELEGATE_H_ | 6 #define COMPONENTS_NACL_COMMON_NACL_BROWSER_DELEGATE_H_ |
| 7 | 7 |
| 8 #include <string> | 8 #include <string> |
| 9 | 9 |
| 10 #include "base/callback_forward.h" |
| 11 |
| 10 namespace base { | 12 namespace base { |
| 11 class FilePath; | 13 class FilePath; |
| 12 } | 14 } |
| 13 | 15 |
| 14 namespace ppapi { | 16 namespace ppapi { |
| 15 namespace host { | 17 namespace host { |
| 16 class HostFactory; | 18 class HostFactory; |
| 17 } | 19 } |
| 18 } | 20 } |
| 19 | 21 |
| (...skipping 26 matching lines...) Expand all Loading... |
| 46 virtual bool GetPnaclDirectory(base::FilePath* pnacl_dir) = 0; | 48 virtual bool GetPnaclDirectory(base::FilePath* pnacl_dir) = 0; |
| 47 // Returns true on success, false otherwise. On success |user_dir| contains | 49 // Returns true on success, false otherwise. On success |user_dir| contains |
| 48 // the user data directory. On failure, it is not changed. | 50 // the user data directory. On failure, it is not changed. |
| 49 virtual bool GetUserDirectory(base::FilePath* user_dir) = 0; | 51 virtual bool GetUserDirectory(base::FilePath* user_dir) = 0; |
| 50 // Returns the version as a string. This string is used to invalidate | 52 // Returns the version as a string. This string is used to invalidate |
| 51 // validator cache entries when Chromium is upgraded | 53 // validator cache entries when Chromium is upgraded |
| 52 virtual std::string GetVersionString() const = 0; | 54 virtual std::string GetVersionString() const = 0; |
| 53 // Returns a HostFactory that hides the details of its embedder. | 55 // Returns a HostFactory that hides the details of its embedder. |
| 54 virtual ppapi::host::HostFactory* CreatePpapiHostFactory( | 56 virtual ppapi::host::HostFactory* CreatePpapiHostFactory( |
| 55 content::BrowserPpapiHost* ppapi_host) = 0; | 57 content::BrowserPpapiHost* ppapi_host) = 0; |
| 58 // Install PNaCl if this operation is supported. On success, the |installed| |
| 59 // callback should be called with true, and on failure (or not supported), |
| 60 // the |installed| callback should be called with false. |
| 61 // TODO(jvoung): Add the progress callback as well. |
| 62 virtual void TryInstallPnacl( |
| 63 const base::Callback<void(bool)>& installed) = 0; |
| 56 }; | 64 }; |
| 57 | 65 |
| 58 #endif // COMPONENTS_NACL_COMMON_NACL_BROWSER_DELEGATE_H_ | 66 #endif // COMPONENTS_NACL_COMMON_NACL_BROWSER_DELEGATE_H_ |
| OLD | NEW |