| OLD | NEW |
| 1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2009 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 BASE_SCOPED_VARIANT_WIN_H_ | 5 #ifndef BASE_SCOPED_VARIANT_WIN_H_ |
| 6 #define BASE_SCOPED_VARIANT_WIN_H_ | 6 #define BASE_SCOPED_VARIANT_WIN_H_ |
| 7 | 7 |
| 8 #include <windows.h> | 8 #include <windows.h> |
| 9 #include <oleauto.h> | 9 #include <oleauto.h> |
| 10 | 10 |
| (...skipping 100 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 111 // it as such and cast away the constness here. | 111 // it as such and cast away the constness here. |
| 112 return const_cast<VARIANT*>(&var_); | 112 return const_cast<VARIANT*>(&var_); |
| 113 } | 113 } |
| 114 | 114 |
| 115 // Allows the ScopedVariant instance to be passed to functions either by value | 115 // Allows the ScopedVariant instance to be passed to functions either by value |
| 116 // or by const reference. | 116 // or by const reference. |
| 117 operator const VARIANT&() const { | 117 operator const VARIANT&() const { |
| 118 return var_; | 118 return var_; |
| 119 } | 119 } |
| 120 | 120 |
| 121 #ifndef OFFICIAL_BUILD | 121 // Used as a debug check to see if we're leaking anything. |
| 122 static bool IsLeakableVarType(VARTYPE vt); | 122 static bool IsLeakableVarType(VARTYPE vt); |
| 123 #endif | |
| 124 | 123 |
| 125 protected: | 124 protected: |
| 126 VARIANT var_; | 125 VARIANT var_; |
| 127 | 126 |
| 128 private: | 127 private: |
| 129 // Comparison operators for ScopedVariant are not supported at this point. | 128 // Comparison operators for ScopedVariant are not supported at this point. |
| 130 // Use the Compare method instead. | 129 // Use the Compare method instead. |
| 131 bool operator==(const ScopedVariant& var) const; | 130 bool operator==(const ScopedVariant& var) const; |
| 132 bool operator!=(const ScopedVariant& var) const; | 131 bool operator!=(const ScopedVariant& var) const; |
| 133 DISALLOW_COPY_AND_ASSIGN(ScopedVariant); | 132 DISALLOW_COPY_AND_ASSIGN(ScopedVariant); |
| 134 }; | 133 }; |
| 135 | 134 |
| 136 #endif // BASE_SCOPED_VARIANT_WIN_H_ | 135 #endif // BASE_SCOPED_VARIANT_WIN_H_ |
| OLD | NEW |