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

Unified Diff: ui/android/view_android.cc

Issue 2453213003: Have WebContentsViewAndroid own ViewAndroid (Closed)
Patch Set: fixed builds & rebased Created 4 years, 1 month 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
« ui/android/view_android.h ('K') | « ui/android/view_android.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/android/view_android.cc
diff --git a/ui/android/view_android.cc b/ui/android/view_android.cc
index f881b51e18c3ff62065e6bcd41a02941653a3d26..664758cd5304088709f1cd99bdb655bae764aadf 100644
--- a/ui/android/view_android.cc
+++ b/ui/android/view_android.cc
@@ -85,6 +85,11 @@ ViewAndroid::~ViewAndroid() {
}
}
+void ViewAndroid::SetDelegate(const JavaRef<jobject>& delegate) {
+ JNIEnv* env = base::android::AttachCurrentThread();
+ delegate_ = JavaObjectWeakGlobalRef(env, delegate);
+}
+
void ViewAndroid::AddChild(ViewAndroid* child) {
DCHECK(child);
DCHECK(std::find(children_.begin(), children_.end(), child) ==
« ui/android/view_android.h ('K') | « ui/android/view_android.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698