OLD | NEW |
---|---|
(Empty) | |
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. | |
2 // Use of this source code is governed by a BSD-style license that can be | |
3 // found in the LICENSE file. | |
4 | |
5 #ifndef UI_ANDROID_VIEW_ANDROID_H_ | |
6 #define UI_ANDROID_VIEW_ANDROID_H_ | |
7 | |
8 #include <jni.h> | |
9 #include "base/android/jni_helper.h" | |
10 #include "base/android/scoped_java_ref.h" | |
11 | |
12 namespace ui { | |
13 | |
14 class WindowAndroid; | |
15 | |
16 // This class is the native counterpart for ViewAndroid. | |
joth
2013/04/18 01:41:17
mention ownership
aurimas (slooooooooow)
2013/04/18 02:49:57
Done.
| |
17 class UI_EXPORT ViewAndroid { | |
18 public: | |
19 ViewAndroid(JNIEnv* env, jobject obj, WindowAndroid* window); | |
20 | |
21 void Destroy(JNIEnv* env, jobject obj); | |
22 | |
23 WindowAndroid* GetWindowAndroid(); | |
24 | |
25 base::android::ScopedJavaLocalRef<jobject> GetJavaObject(); | |
26 | |
27 static bool RegisterViewAndroid(JNIEnv* env); | |
28 | |
29 private: | |
30 ~ViewAndroid(); | |
31 JavaObjectWeakGlobalRef weak_java_view_; | |
32 WindowAndroid* window_android_; | |
33 | |
34 DISALLOW_COPY_AND_ASSIGN(ViewAndroid); | |
35 }; | |
36 | |
37 } // namespace ui | |
38 | |
39 #endif // UI_ANDROID_VIEW_ANDROID_H_ | |
OLD | NEW |