Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(370)

Side by Side Diff: ppapi/native_client/src/trusted/plugin/pnacl_resources.h

Issue 307933005: Pepper: Refactor PNaCl OpenManifestEntry logic. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Add comment for bbudge Created 6 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 NATIVE_CLIENT_SRC_TRUSTED_PLUGIN_PNACL_RESOURCES_H_ 5 #ifndef NATIVE_CLIENT_SRC_TRUSTED_PLUGIN_PNACL_RESOURCES_H_
6 #define NATIVE_CLIENT_SRC_TRUSTED_PLUGIN_PNACL_RESOURCES_H_ 6 #define NATIVE_CLIENT_SRC_TRUSTED_PLUGIN_PNACL_RESOURCES_H_
7 7
8 #include <map> 8 #include <map>
9 #include <vector> 9 #include <vector>
10 10
11 #include "native_client/src/include/nacl_macros.h" 11 #include "native_client/src/include/nacl_macros.h"
12 #include "native_client/src/include/nacl_string.h" 12 #include "native_client/src/include/nacl_string.h"
13 #include "native_client/src/trusted/desc/nacl_desc_wrapper.h" 13 #include "native_client/src/trusted/desc/nacl_desc_wrapper.h"
14 14
15 #include "ppapi/c/private/pp_file_handle.h" 15 #include "ppapi/c/private/pp_file_handle.h"
16 #include "ppapi/cpp/completion_callback.h" 16 #include "ppapi/cpp/completion_callback.h"
17 17
18 #include "ppapi/native_client/src/trusted/plugin/plugin_error.h" 18 #include "ppapi/native_client/src/trusted/plugin/plugin_error.h"
19 19
20 namespace plugin { 20 namespace plugin {
21 21
22 class Plugin; 22 class Plugin;
23 class PnaclCoordinator; 23 class PnaclCoordinator;
24 24
25 // Constants for loading LLC and LD.
26 class PnaclUrls {
27 public:
28 static bool IsPnaclComponent(const nacl::string& full_url);
29 static nacl::string PnaclComponentURLToFilename(
30 const nacl::string& full_url);
31 };
32
33 // Loads a list of resources, providing a way to get file descriptors for 25 // Loads a list of resources, providing a way to get file descriptors for
34 // these resources. URLs for resources are resolved by the manifest 26 // these resources. URLs for resources are resolved by the manifest
35 // and point to pnacl component filesystem resources. 27 // and point to pnacl component filesystem resources.
36 class PnaclResources { 28 class PnaclResources {
37 public: 29 public:
38 PnaclResources(Plugin* plugin, 30 PnaclResources(Plugin* plugin,
39 PnaclCoordinator* coordinator) 31 PnaclCoordinator* coordinator)
40 : plugin_(plugin), 32 : plugin_(plugin),
41 coordinator_(coordinator), 33 coordinator_(coordinator),
42 llc_file_handle_(PP_kInvalidFileHandle), 34 llc_file_handle_(PP_kInvalidFileHandle),
(...skipping 30 matching lines...) Expand all
73 65
74 // File handles for llc and ld executables, after they've been opened. 66 // File handles for llc and ld executables, after they've been opened.
75 // Only valid after the callback for StartLoad() has been called, and until 67 // Only valid after the callback for StartLoad() has been called, and until
76 // TakeLlcFileHandle()/TakeLdFileHandle() is called. 68 // TakeLlcFileHandle()/TakeLdFileHandle() is called.
77 PP_FileHandle llc_file_handle_; 69 PP_FileHandle llc_file_handle_;
78 PP_FileHandle ld_file_handle_; 70 PP_FileHandle ld_file_handle_;
79 }; 71 };
80 72
81 } // namespace plugin; 73 } // namespace plugin;
82 #endif // NATIVE_CLIENT_SRC_TRUSTED_PLUGIN_PNACL_RESOURCES_H_ 74 #endif // NATIVE_CLIENT_SRC_TRUSTED_PLUGIN_PNACL_RESOURCES_H_
OLDNEW
« no previous file with comments | « ppapi/c/private/ppb_nacl_private.h ('k') | ppapi/native_client/src/trusted/plugin/pnacl_resources.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698