| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (c) 2012 The Chromium Authors. All rights reserved. | 2 * Copyright (c) 2012 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 29 matching lines...) Expand all Loading... |
| 40 // a resource in the extension origin. | 40 // a resource in the extension origin. |
| 41 | 41 |
| 42 // Gets the full program URL for the current sandbox ISA from the | 42 // Gets the full program URL for the current sandbox ISA from the |
| 43 // manifest file. Fills in |pnacl_options| if the program requires | 43 // manifest file. Fills in |pnacl_options| if the program requires |
| 44 // PNaCl translation. | 44 // PNaCl translation. |
| 45 virtual bool GetProgramURL(nacl::string* full_url, | 45 virtual bool GetProgramURL(nacl::string* full_url, |
| 46 PP_PNaClOptions* pnacl_options, | 46 PP_PNaClOptions* pnacl_options, |
| 47 bool* uses_nonsfi_mode, | 47 bool* uses_nonsfi_mode, |
| 48 ErrorInfo* error_info) const = 0; | 48 ErrorInfo* error_info) const = 0; |
| 49 | 49 |
| 50 // Gets the file names from the "files" section of the manifest. No | |
| 51 // checking that the keys' values are proper ISA dictionaries -- it | |
| 52 // is assumed that other consistency checks take care of that, and | |
| 53 // that the keys are appropriate for use with ResolveKey. | |
| 54 virtual bool GetFileKeys(std::set<nacl::string>* keys) const = 0; | |
| 55 | |
| 56 // Resolves a key from the "files" section to a fully resolved URL, | 50 // Resolves a key from the "files" section to a fully resolved URL, |
| 57 // i.e., relative URL values are fully expanded relative to the | 51 // i.e., relative URL values are fully expanded relative to the |
| 58 // manifest's URL. Fills in |pnacl_options| if | 52 // manifest's URL. Fills in |pnacl_options| if |
| 59 // the resolved key requires a pnacl translation step to obtain | 53 // the resolved key requires a pnacl translation step to obtain |
| 60 // the final requested resource. | 54 // the final requested resource. |
| 61 // If there was an error, details are reported via error_info. | 55 // If there was an error, details are reported via error_info. |
| 62 virtual bool ResolveKey(const nacl::string& key, | 56 virtual bool ResolveKey(const nacl::string& key, |
| 63 nacl::string* full_url, | 57 nacl::string* full_url, |
| 64 PP_PNaClOptions* pnacl_options, | 58 PP_PNaClOptions* pnacl_options, |
| 65 ErrorInfo* error_info) const = 0; | 59 ErrorInfo* error_info) const = 0; |
| 66 | 60 |
| 67 protected: | 61 protected: |
| 68 NACL_DISALLOW_COPY_AND_ASSIGN(Manifest); | 62 NACL_DISALLOW_COPY_AND_ASSIGN(Manifest); |
| 69 }; | 63 }; |
| 70 | 64 |
| 71 | 65 |
| 72 } // namespace plugin | 66 } // namespace plugin |
| 73 | 67 |
| 74 #endif // NATIVE_CLIENT_SRC_TRUSTED_PLUGIN_MANIFEST_H_ | 68 #endif // NATIVE_CLIENT_SRC_TRUSTED_PLUGIN_MANIFEST_H_ |
| OLD | NEW |