OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 PPAPI_CPP_VAR_H_ | 5 #ifndef PPAPI_CPP_VAR_H_ |
6 #define PPAPI_CPP_VAR_H_ | 6 #define PPAPI_CPP_VAR_H_ |
7 | 7 |
8 #include <stdint.h> | 8 #include <stdint.h> |
9 | 9 |
10 #include <string> | 10 #include <string> |
(...skipping 297 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
308 | 308 |
309 protected: | 309 protected: |
310 PP_Var var_; | 310 PP_Var var_; |
311 | 311 |
312 // |is_managed_| indicates if the instance manages |var_|. | 312 // |is_managed_| indicates if the instance manages |var_|. |
313 // You need to check if |var_| is refcounted to call Release(). | 313 // You need to check if |var_| is refcounted to call Release(). |
314 bool is_managed_; | 314 bool is_managed_; |
315 | 315 |
316 private: | 316 private: |
317 // Prevent an arbitrary pointer argument from being implicitly converted to | 317 // Prevent an arbitrary pointer argument from being implicitly converted to |
318 // a bool at Var construction. If somebody makes such a mistake, (s)he will | 318 // a bool at Var construction. If somebody makes such a mistake, they will |
319 // get a compilation error. | 319 // get a compilation error. |
320 Var(void* non_scriptable_object_pointer); | 320 Var(void* non_scriptable_object_pointer); |
321 }; | 321 }; |
322 | 322 |
323 } // namespace pp | 323 } // namespace pp |
324 | 324 |
325 #endif // PPAPI_CPP_VAR_H_ | 325 #endif // PPAPI_CPP_VAR_H_ |
OLD | NEW |