OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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_RESOURCE_H_ | 5 #ifndef PPAPI_CPP_RESOURCE_H_ |
6 #define PPAPI_CPP_RESOURCE_H_ | 6 #define PPAPI_CPP_RESOURCE_H_ |
7 | 7 |
8 #include "ppapi/c/pp_resource.h" | 8 #include "ppapi/c/pp_resource.h" |
9 | 9 |
10 /// @file | 10 /// @file |
(...skipping 13 matching lines...) Expand all Loading... |
24 /// @param[in] other A <code>Resource</code>. | 24 /// @param[in] other A <code>Resource</code>. |
25 Resource(const Resource& other); | 25 Resource(const Resource& other); |
26 | 26 |
27 /// Destructor. | 27 /// Destructor. |
28 virtual ~Resource(); | 28 virtual ~Resource(); |
29 | 29 |
30 /// This function assigns one <code>Resource</code> to another | 30 /// This function assigns one <code>Resource</code> to another |
31 /// <code>Resource</code>. | 31 /// <code>Resource</code>. |
32 /// | 32 /// |
33 /// @param[in] other A Resource. | 33 /// @param[in] other A Resource. |
| 34 /// |
34 /// @return A Resource containing the assigned Resource. | 35 /// @return A Resource containing the assigned Resource. |
35 Resource& operator=(const Resource& other); | 36 Resource& operator=(const Resource& other); |
36 | 37 |
37 /// This functions determines if this resource is invalid or | 38 /// This functions determines if this resource is invalid or |
38 /// uninitialized. | 39 /// uninitialized. |
39 /// | 40 /// |
40 /// @return true if this resource is invalid or uninitialized. | 41 /// @return true if this resource is invalid or uninitialized. |
41 bool is_null() const { return !pp_resource_; } | 42 bool is_null() const { return !pp_resource_; } |
42 | 43 |
43 PP_Resource pp_resource() const { return pp_resource_; } | 44 PP_Resource pp_resource() const { return pp_resource_; } |
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
77 PP_Resource pp_resource_; | 78 PP_Resource pp_resource_; |
78 }; | 79 }; |
79 | 80 |
80 } // namespace pp | 81 } // namespace pp |
81 | 82 |
82 inline bool operator==(const pp::Resource& lhs, const pp::Resource& rhs) { | 83 inline bool operator==(const pp::Resource& lhs, const pp::Resource& rhs) { |
83 return lhs.pp_resource() == rhs.pp_resource(); | 84 return lhs.pp_resource() == rhs.pp_resource(); |
84 } | 85 } |
85 | 86 |
86 #endif // PPAPI_CPP_RESOURCE_H_ | 87 #endif // PPAPI_CPP_RESOURCE_H_ |
OLD | NEW |