Upstream version 7.35.144.0
[platform/framework/web/crosswalk.git] / src / ppapi / native_client / src / trusted / plugin / pnacl_options.h
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #ifndef NATIVE_CLIENT_SRC_TRUSTED_PLUGIN_PNACL_OPTIONS_H_
6 #define NATIVE_CLIENT_SRC_TRUSTED_PLUGIN_PNACL_OPTIONS_H_
7
8 #include <vector>
9
10 #include "native_client/src/include/nacl_string.h"
11 #include "native_client/src/include/portability.h"
12
13 namespace plugin {
14
15 // Options for PNaCl translation.
16 class PnaclOptions {
17
18  public:
19   PnaclOptions();
20   ~PnaclOptions();
21
22   // Return a character array of \x00 delimited commandline options.
23   std::vector<char> GetOptCommandline() const;
24
25   bool translate() const { return translate_; }
26   void set_translate(bool t) { translate_ = t; }
27
28   bool is_debug() const { return is_debug_; }
29   void set_debug(bool t) { is_debug_ = t; }
30
31   int32_t opt_level() const { return opt_level_; }
32   void set_opt_level(int32_t l);
33
34  private:
35   // NOTE: There are users of this class that use the copy constructor.
36   // Currently the default copy constructor is good enough, but
37   // double-check that it is the case when more fields are added.
38   bool translate_;
39   bool is_debug_;
40   int32_t opt_level_;
41 };
42
43 }  // namespace plugin;
44 #endif  // NATIVE_CLIENT_SRC_TRUSTED_PLUGIN_PNACL_OPTIONS_H_