OLD | NEW |
1 /* | 1 /* |
2 * Copyright (c) 2011 The Chromium Authors. All rights reserved. | 2 * Copyright (c) 2011 The Chromium Authors. All rights reserved. |
3 * Use of this source code is governed by a BSD-style license that can be | 3 * Use of this source code is governed by a BSD-style license that can be |
4 * found in the LICENSE file. | 4 * found in the LICENSE file. |
5 */ | 5 */ |
6 | 6 |
7 // Manifest interface class. | 7 // Manifest interface class. |
8 | 8 |
9 #ifndef NATIVE_CLIENT_SRC_TRUSTED_PLUGIN_MANIFEST_H_ | 9 #ifndef NATIVE_CLIENT_SRC_TRUSTED_PLUGIN_MANIFEST_H_ |
10 #define NATIVE_CLIENT_SRC_TRUSTED_PLUGIN_MANIFEST_H_ | 10 #define NATIVE_CLIENT_SRC_TRUSTED_PLUGIN_MANIFEST_H_ |
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
59 // i.e., relative URL values are fully expanded relative to the | 59 // i.e., relative URL values are fully expanded relative to the |
60 // manifest's URL (via ResolveURL). If there was an error, details | 60 // manifest's URL (via ResolveURL). If there was an error, details |
61 // are reported via error_info, and is_portable, if non-NULL, tells | 61 // are reported via error_info, and is_portable, if non-NULL, tells |
62 // the caller whether the resolution used the portable | 62 // the caller whether the resolution used the portable |
63 // representation or an ISA-specific version of the file. | 63 // representation or an ISA-specific version of the file. |
64 virtual bool ResolveKey(const nacl::string& key, | 64 virtual bool ResolveKey(const nacl::string& key, |
65 nacl::string* full_url, | 65 nacl::string* full_url, |
66 ErrorInfo* error_info, | 66 ErrorInfo* error_info, |
67 bool* is_portable) const = 0; | 67 bool* is_portable) const = 0; |
68 | 68 |
| 69 // Some manifests (e.g., the pnacl coordinator manifest) need to access |
| 70 // resources from an extension origin distinct from the plugin's origin |
| 71 // (e.g., the pnacl coordinator needs to load llc, ld, and some libraries). |
| 72 // This method returns true if such access should be allowed. |
| 73 virtual bool PermitsExtensionUrls() const = 0; |
| 74 |
69 protected: | 75 protected: |
70 NACL_DISALLOW_COPY_AND_ASSIGN(Manifest); | 76 NACL_DISALLOW_COPY_AND_ASSIGN(Manifest); |
71 | 77 |
72 const pp::URLUtil_Dev* url_util_; | 78 const pp::URLUtil_Dev* url_util_; |
73 nacl::string manifest_base_url_; | 79 nacl::string manifest_base_url_; |
74 nacl::string sandbox_isa_; | 80 nacl::string sandbox_isa_; |
75 // Determines whether portable programs are chosen in manifest files over | 81 // Determines whether portable programs are chosen in manifest files over |
76 // native programs. | 82 // native programs. |
77 bool prefer_portable_; | 83 bool prefer_portable_; |
78 }; | 84 }; |
79 | 85 |
80 | 86 |
81 } // namespace plugin | 87 } // namespace plugin |
82 | 88 |
83 #endif // NATIVE_CLIENT_SRC_TRUSTED_PLUGIN_MANIFEST_H_ | 89 #endif // NATIVE_CLIENT_SRC_TRUSTED_PLUGIN_MANIFEST_H_ |
OLD | NEW |