OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 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 UI_ANDROID_VIEW_ANDROID_H_ | 5 #ifndef UI_ANDROID_VIEW_ANDROID_H_ |
6 #define UI_ANDROID_VIEW_ANDROID_H_ | 6 #define UI_ANDROID_VIEW_ANDROID_H_ |
7 | 7 |
8 #include <jni.h> | 8 #include <jni.h> |
9 #include "base/android/jni_weak_ref.h" | 9 #include "base/android/jni_weak_ref.h" |
10 #include "base/android/scoped_java_ref.h" | 10 #include "base/android/scoped_java_ref.h" |
11 #include "ui/android/ui_android_export.h" | 11 #include "ui/android/ui_android_export.h" |
12 | 12 |
13 namespace ui { | 13 namespace ui { |
14 | 14 |
15 class WindowAndroid; | 15 class WindowAndroid; |
16 | 16 |
17 // This class is merely a holder of the Java object. It must be destroyed | 17 // This class is merely a holder of the Java object. It must be destroyed |
18 // explicitly. | 18 // explicitly. |
19 class UI_ANDROID_EXPORT ViewAndroid { | 19 class UI_ANDROID_EXPORT ViewAndroid { |
20 public: | 20 public: |
21 ViewAndroid(jobject obj, WindowAndroid* window); | 21 ViewAndroid(jobject obj, WindowAndroid* window); |
22 ~ViewAndroid(); | 22 ~ViewAndroid(); |
23 | 23 |
24 WindowAndroid* GetWindowAndroid(); | 24 WindowAndroid* GetWindowAndroid(); |
25 | 25 |
26 base::android::ScopedJavaLocalRef<jobject> GetJavaObject(); | 26 base::android::ScopedJavaLocalRef<jobject> GetViewAndroidDelegate(); |
27 | 27 |
28 private: | 28 private: |
29 base::android::ScopedJavaGlobalRef<jobject> java_view_; | 29 base::android::ScopedJavaGlobalRef<jobject> view_android_delegate_; |
30 WindowAndroid* window_android_; | 30 WindowAndroid* window_android_; |
31 | 31 |
32 DISALLOW_COPY_AND_ASSIGN(ViewAndroid); | 32 DISALLOW_COPY_AND_ASSIGN(ViewAndroid); |
33 }; | 33 }; |
34 | 34 |
35 } // namespace ui | 35 } // namespace ui |
36 | 36 |
37 #endif // UI_ANDROID_VIEW_ANDROID_H_ | 37 #endif // UI_ANDROID_VIEW_ANDROID_H_ |
OLD | NEW |