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 BASE_ANDROID_SCOPED_JAVA_REF_H_ | 5 #ifndef BASE_ANDROID_SCOPED_JAVA_REF_H_ |
6 #define BASE_ANDROID_SCOPED_JAVA_REF_H_ | 6 #define BASE_ANDROID_SCOPED_JAVA_REF_H_ |
7 | 7 |
8 #include <jni.h> | 8 #include <jni.h> |
9 #include <stddef.h> | 9 #include <stddef.h> |
10 | 10 |
11 #include "base/base_export.h" | 11 #include "base/base_export.h" |
12 #include "base/basictypes.h" | |
13 #include "base/logging.h" | 12 #include "base/logging.h" |
| 13 #include "base/macros.h" |
14 #include "base/template_util.h" | 14 #include "base/template_util.h" |
15 | 15 |
16 namespace base { | 16 namespace base { |
17 namespace android { | 17 namespace android { |
18 | 18 |
19 // Creates a new local reference frame, in which at least a given number of | 19 // Creates a new local reference frame, in which at least a given number of |
20 // local references can be created. Note that local references already created | 20 // local references can be created. Note that local references already created |
21 // in previous local frames are still valid in the current local frame. | 21 // in previous local frames are still valid in the current local frame. |
22 class BASE_EXPORT ScopedJavaLocalFrame { | 22 class BASE_EXPORT ScopedJavaLocalFrame { |
23 public: | 23 public: |
(...skipping 250 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
274 // is *not* a transfer of ownership and Release() should not be used. | 274 // is *not* a transfer of ownership and Release() should not be used. |
275 T Release() { | 275 T Release() { |
276 return static_cast<T>(this->ReleaseInternal()); | 276 return static_cast<T>(this->ReleaseInternal()); |
277 } | 277 } |
278 }; | 278 }; |
279 | 279 |
280 } // namespace android | 280 } // namespace android |
281 } // namespace base | 281 } // namespace base |
282 | 282 |
283 #endif // BASE_ANDROID_SCOPED_JAVA_REF_H_ | 283 #endif // BASE_ANDROID_SCOPED_JAVA_REF_H_ |
OLD | NEW |