Chromium Code Reviews| Index: components/nacl/browser/nacl_process_host.h |
| diff --git a/components/nacl/browser/nacl_process_host.h b/components/nacl/browser/nacl_process_host.h |
| index 6db28c0db5791d1db800525269f162238a6706f1..1617a127a4a5bc9529a9a80b8aa27694b658e2ba 100644 |
| --- a/components/nacl/browser/nacl_process_host.h |
| +++ b/components/nacl/browser/nacl_process_host.h |
| @@ -7,6 +7,10 @@ |
| #include "build/build_config.h" |
| +#include <string> |
| +#include <utility> |
| +#include <vector> |
| + |
| #include "base/files/file.h" |
| #include "base/files/file_path.h" |
| #include "base/files/file_util_proxy.h" |
| @@ -46,6 +50,7 @@ void* AllocateAddressSpaceASLR(base::ProcessHandle process, size_t size); |
| // running in the renderer and NaCl processes. |
| class NaClProcessHost : public content::BrowserChildProcessHostDelegate { |
| public: |
| + class ResourceFileInfo; |
| // manifest_url: the URL of the manifest of the Native Client plugin being |
| // executed. |
| // nexe_file: A file that corresponds to the nexe module to be loaded. |
| @@ -57,16 +62,19 @@ class NaClProcessHost : public content::BrowserChildProcessHostDelegate { |
| // off_the_record: was the process launched from an incognito renderer? |
| // process_type: the type of NaCl process. |
| // profile_directory: is the path of current profile directory. |
| - NaClProcessHost(const GURL& manifest_url, |
| - base::File nexe_file, |
| - const NaClFileToken& nexe_token, |
| - ppapi::PpapiPermissions permissions, |
| - int render_view_id, |
| - uint32 permission_bits, |
| - bool uses_nonsfi_mode, |
| - bool off_the_record, |
| - NaClAppProcessType process_type, |
| - const base::FilePath& profile_directory); |
| + NaClProcessHost( |
| + const GURL& manifest_url, |
| + base::File nexe_file, |
| + const NaClFileToken& nexe_token, |
| + scoped_ptr<ResourceFileInfo[]> resource_files_info, |
| + size_t resource_files_info_len_, |
| + ppapi::PpapiPermissions permissions, |
| + int render_view_id, |
| + uint32 permission_bits, |
| + bool uses_nonsfi_mode, |
| + bool off_the_record, |
| + NaClAppProcessType process_type, |
| + const base::FilePath& profile_directory); |
| ~NaClProcessHost() override; |
| void OnProcessCrashed(int exit_status) override; |
| @@ -95,6 +103,28 @@ class NaClProcessHost : public content::BrowserChildProcessHostDelegate { |
| content::BrowserChildProcessHost* process() { return process_.get(); } |
| content::BrowserPpapiHost* browser_ppapi_host() { return ppapi_host_.get(); } |
| + class ResourceFileInfo { |
|
hidehiko
2015/01/28 09:05:19
Let's avoid public nested class.
http://google-sty
Mark Seaborn
2015/02/02 23:21:50
I agree.
Yusuke Sato
2015/02/04 02:00:28
Done.
Yusuke Sato
2015/02/04 02:00:28
Done.
|
| + MOVE_ONLY_TYPE_FOR_CPP_03(ResourceFileInfo, RValue); |
| + public: |
| + ResourceFileInfo(); |
| + ResourceFileInfo(base::File file, |
| + const NaClFileToken& file_token, |
| + const std::string& file_key); |
| + ~ResourceFileInfo(); |
| + |
| + ResourceFileInfo(RValue other); |
| + ResourceFileInfo& operator=(RValue other); |
| + |
| + base::File file() { return file_.Pass(); } |
|
hidehiko
2015/01/28 09:05:19
Releasing the ownership by getter looks confusing.
Mark Seaborn
2015/02/02 23:21:50
Indeed... Any reason not to make this a struct, an
Yusuke Sato
2015/02/04 02:00:28
Done.
Yusuke Sato
2015/02/04 02:00:28
Done.
|
| + const NaClFileToken& file_token() const { return file_token_; } |
| + const std::string& file_key() const { return file_key_; } |
| + |
| + private: |
| + base::File file_; |
| + NaClFileToken file_token_; |
| + std::string file_key_; |
| + }; |
| + |
| private: |
| bool LaunchNaClGdb(); |
| @@ -182,6 +212,8 @@ class NaClProcessHost : public content::BrowserChildProcessHostDelegate { |
| GURL manifest_url_; |
| base::File nexe_file_; |
| NaClFileToken nexe_token_; |
| + scoped_ptr<ResourceFileInfo[]> resource_files_info_; |
| + size_t resource_files_info_len_; |
| ppapi::PpapiPermissions permissions_; |