OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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_RENDERER_JSON_MANIFEST_H | 5 #ifndef COMPONENTS_NACL_RENDERER_JSON_MANIFEST_H |
6 #define COMPONENTS_NACL_RENDERER_JSON_MANIFEST_H | 6 #define COMPONENTS_NACL_RENDERER_JSON_MANIFEST_H |
7 | 7 |
8 #include <set> | 8 #include <set> |
9 #include <string> | 9 #include <string> |
10 | 10 |
11 #include "base/memory/scoped_ptr.h" | |
12 #include "ppapi/c/pp_array_output.h" | 11 #include "ppapi/c/pp_array_output.h" |
13 #include "ppapi/c/pp_instance.h" | |
14 #include "ppapi/c/private/ppb_nacl_private.h" | 12 #include "ppapi/c/private/ppb_nacl_private.h" |
15 #include "third_party/jsoncpp/source/include/json/value.h" | 13 #include "third_party/jsoncpp/source/include/json/value.h" |
16 | 14 |
17 namespace nacl { | 15 namespace nacl { |
18 class JsonManifest; | 16 class JsonManifest; |
19 class NexeLoadManager; | 17 class NexeLoadManager; |
20 | 18 |
21 // There is at most one JsonManifest per PP_Instance. This adds a one-to-one | |
22 // mapping. | |
23 void AddJsonManifest(PP_Instance instance, scoped_ptr<JsonManifest> manifest); | |
24 | |
25 // Returns a non-owning pointer to the JsonManifest for the given instance. | |
26 // Returns NULL if no such JsonManifest exists. | |
27 JsonManifest* GetJsonManifest(PP_Instance instance); | |
28 void DeleteJsonManifest(PP_Instance instance); | |
29 | |
30 class JsonManifest { | 19 class JsonManifest { |
31 public: | 20 public: |
32 struct ErrorInfo { | 21 struct ErrorInfo { |
33 PP_NaClError error; | 22 PP_NaClError error; |
34 std::string string; | 23 std::string string; |
35 }; | 24 }; |
36 | 25 |
37 JsonManifest(const std::string& manifest_base_url, | 26 JsonManifest(const std::string& manifest_base_url, |
38 const std::string& sandbox_isa, | 27 const std::string& sandbox_isa, |
39 bool nonsfi_enabled, | 28 bool nonsfi_enabled, |
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
76 bool nonsfi_enabled_; | 65 bool nonsfi_enabled_; |
77 bool pnacl_debug_; | 66 bool pnacl_debug_; |
78 | 67 |
79 // The dictionary of manifest information parsed in Init(). | 68 // The dictionary of manifest information parsed in Init(). |
80 Json::Value dictionary_; | 69 Json::Value dictionary_; |
81 }; | 70 }; |
82 | 71 |
83 } // namespace nacl | 72 } // namespace nacl |
84 | 73 |
85 #endif // COMPONENTS_NACL_RENDERER_JSON_MANIFEST_H | 74 #endif // COMPONENTS_NACL_RENDERER_JSON_MANIFEST_H |
OLD | NEW |