| OLD | NEW |
| 1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. | 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 | 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 NATIVE_CLIENT_SRC_TRUSTED_PLUGIN_PNACL_OPTIONS_H_ | 5 #ifndef NATIVE_CLIENT_SRC_TRUSTED_PLUGIN_PNACL_OPTIONS_H_ |
| 6 #define NATIVE_CLIENT_SRC_TRUSTED_PLUGIN_PNACL_OPTIONS_H_ | 6 #define NATIVE_CLIENT_SRC_TRUSTED_PLUGIN_PNACL_OPTIONS_H_ |
| 7 | 7 |
| 8 #include <vector> | 8 #include <vector> |
| 9 | 9 |
| 10 #include "native_client/src/include/nacl_string.h" | 10 #include "native_client/src/include/nacl_string.h" |
| 11 #include "native_client/src/include/portability.h" | 11 #include "native_client/src/include/portability.h" |
| 12 | 12 |
| 13 namespace plugin { | 13 namespace plugin { |
| 14 | 14 |
| 15 // Options for PNaCl translation. | 15 // Options for PNaCl translation. |
| 16 class PnaclOptions { | 16 class PnaclOptions { |
| 17 | 17 |
| 18 public: | 18 public: |
| 19 PnaclOptions(); | 19 PnaclOptions(); |
| 20 ~PnaclOptions(); | 20 ~PnaclOptions(); |
| 21 | 21 |
| 22 // Return a character array of \x00 delimited commandline options. | 22 // Return a character array of \x00 delimited commandline options. |
| 23 std::vector<char> GetOptCommandline() const; | 23 std::vector<char> GetOptCommandline() const; |
| 24 | 24 |
| 25 bool translate() const { return translate_; } | 25 bool translate() const { return translate_; } |
| 26 void set_translate(bool t) { translate_ = t; } | 26 void set_translate(bool t) { translate_ = t; } |
| 27 | 27 |
| 28 bool is_debug() const { return is_debug_; } |
| 29 void set_debug(bool t) { is_debug_ = t; } |
| 30 |
| 28 int32_t opt_level() const { return opt_level_; } | 31 int32_t opt_level() const { return opt_level_; } |
| 29 void set_opt_level(int32_t l); | 32 void set_opt_level(int32_t l); |
| 30 | 33 |
| 31 private: | 34 private: |
| 32 // NOTE: There are users of this class that use the copy constructor. | 35 // NOTE: There are users of this class that use the copy constructor. |
| 33 // Currently the default copy constructor is good enough, but | 36 // Currently the default copy constructor is good enough, but |
| 34 // double-check that it is the case when more fields are added. | 37 // double-check that it is the case when more fields are added. |
| 35 bool translate_; | 38 bool translate_; |
| 39 bool is_debug_; |
| 36 int32_t opt_level_; | 40 int32_t opt_level_; |
| 37 }; | 41 }; |
| 38 | 42 |
| 39 } // namespace plugin; | 43 } // namespace plugin; |
| 40 #endif // NATIVE_CLIENT_SRC_TRUSTED_PLUGIN_PNACL_OPTIONS_H_ | 44 #endif // NATIVE_CLIENT_SRC_TRUSTED_PLUGIN_PNACL_OPTIONS_H_ |
| OLD | NEW |