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

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

Issue 264943003: Pepper: Move manifest logic to components/nacl. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix typo Created 6 years, 7 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
(Empty)
1 /*
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
4 * found in the LICENSE file.
5 */
6
7 // Manifest interface class.
8
9 #ifndef NATIVE_CLIENT_SRC_TRUSTED_PLUGIN_MANIFEST_H_
10 #define NATIVE_CLIENT_SRC_TRUSTED_PLUGIN_MANIFEST_H_
11
12 #include <map>
13 #include <set>
14 #include <string>
15
16 #include "native_client/src/include/nacl_macros.h"
17 #include "native_client/src/include/nacl_string.h"
18 #include "third_party/jsoncpp/source/include/json/value.h"
19
20 struct PP_PNaClOptions;
21
22 namespace pp {
23 class URLUtil_Dev;
24 } // namespace pp
25
26 namespace plugin {
27
28 class ErrorInfo;
29
30 class Manifest {
31 public:
32 Manifest() { }
33 virtual ~Manifest() { }
34
35 // A convention in the interfaces below regarding permit_extension_url:
36 // Some manifests (e.g., the pnacl coordinator manifest) need to access
37 // resources from an extension origin distinct from the plugin's origin
38 // (e.g., the pnacl coordinator needs to load llc, ld, and some libraries).
39 // This out-parameter is true if this manifest lookup confers access to
40 // a resource in the extension origin.
41
42 // Gets the full program URL for the current sandbox ISA from the
43 // manifest file. Fills in |pnacl_options| if the program requires
44 // PNaCl translation.
45 virtual bool GetProgramURL(nacl::string* full_url,
46 PP_PNaClOptions* pnacl_options,
47 bool* uses_nonsfi_mode,
48 ErrorInfo* error_info) const = 0;
49
50 // Resolves a key from the "files" section to a fully resolved URL,
51 // i.e., relative URL values are fully expanded relative to the
52 // manifest's URL. Fills in |pnacl_options| if
53 // the resolved key requires a pnacl translation step to obtain
54 // the final requested resource.
55 virtual bool ResolveKey(const nacl::string& key,
56 nacl::string* full_url,
57 PP_PNaClOptions* pnacl_options) const = 0;
58
59 protected:
60 NACL_DISALLOW_COPY_AND_ASSIGN(Manifest);
61 };
62
63
64 } // namespace plugin
65
66 #endif // NATIVE_CLIENT_SRC_TRUSTED_PLUGIN_MANIFEST_H_
OLDNEW
« no previous file with comments | « ppapi/native_client/src/trusted/plugin/json_manifest.cc ('k') | ppapi/native_client/src/trusted/plugin/plugin.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698