Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(164)

Unified Diff: ui/android/view_android.h

Issue 14018004: [Android] Refactor NativeView to be able to use it for AutofillDialog. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Adding UI_EXPORT Created 7 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: ui/android/view_android.h
diff --git a/ui/android/view_android.h b/ui/android/view_android.h
new file mode 100644
index 0000000000000000000000000000000000000000..327b62b968d1e37182e431f3205357101f6a913b
--- /dev/null
+++ b/ui/android/view_android.h
@@ -0,0 +1,39 @@
+// Copyright (c) 2013 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef UI_ANDROID_VIEW_ANDROID_H_
+#define UI_ANDROID_VIEW_ANDROID_H_
+
+#include <jni.h>
+#include "base/android/jni_helper.h"
+#include "base/android/scoped_java_ref.h"
+
+namespace ui {
+
+class WindowAndroid;
+
+// 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.
+class UI_EXPORT ViewAndroid {
+ public:
+ ViewAndroid(JNIEnv* env, jobject obj, WindowAndroid* window);
+
+ void Destroy(JNIEnv* env, jobject obj);
+
+ WindowAndroid* GetWindowAndroid();
+
+ base::android::ScopedJavaLocalRef<jobject> GetJavaObject();
+
+ static bool RegisterViewAndroid(JNIEnv* env);
+
+ private:
+ ~ViewAndroid();
+ JavaObjectWeakGlobalRef weak_java_view_;
+ WindowAndroid* window_android_;
+
+ DISALLOW_COPY_AND_ASSIGN(ViewAndroid);
+};
+
+} // namespace ui
+
+#endif // UI_ANDROID_VIEW_ANDROID_H_

Powered by Google App Engine
This is Rietveld 408576698