Chromium Code Reviews| OLD | NEW |
|---|---|
| (Empty) | |
| 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 | |
| 3 // found in the LICENSE file. | |
| 4 | |
| 5 #ifndef UI_VIEW_ANDROID_H_ | |
| 6 #define UI_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 deals with the Android native window ref count. | |
| 17 class ViewAndroid { | |
| 18 public: | |
| 19 ViewAndroid(JNIEnv* env, jobject obj, WindowAndroid* window); | |
| 20 | |
| 21 void Destroy(JNIEnv* env, jobject obj); | |
|
aruslan
2013/04/12 16:53:35
This should be called strictly from the Java side
aurimas (slooooooooow)
2013/04/12 18:00:05
Done.
| |
| 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_VIEW_ANDROID_H_ | |
| OLD | NEW |