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

Unified Diff: ui/android/view_android.cc

Issue 2638973004: Use ContainerView for PowerSaveBlocker to keep screen on (Closed)
Patch Set: fix tests Created 3 years, 11 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
« 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 b219487915a8b1ebb59a3990e91e9e0e03d22cd8..60f4b78f37dd6aa261d95eb891e70b0be0e389bc 100644
--- a/ui/android/view_android.cc
+++ b/ui/android/view_android.cc
@@ -133,6 +133,15 @@ void ViewAndroid::SetAnchorRect(const JavaRef<jobject>& anchor,
bounds.height(), scale, left_margin, top_margin);
}
+ScopedJavaLocalRef<jobject> ViewAndroid::GetContainerView() {
+ ScopedJavaLocalRef<jobject> delegate(GetViewAndroidDelegate());
+ if (delegate.is_null())
+ return ScopedJavaLocalRef<jobject>();
boliu 2017/01/18 18:21:16 nullptr should work I think
Jinsuk Kim 2017/01/19 23:48:08 Done.
+
+ JNIEnv* env = base::android::AttachCurrentThread();
+ return Java_ViewAndroidDelegate_getContainerView(env, delegate);
+}
+
void ViewAndroid::RemoveChild(ViewAndroid* child) {
DCHECK(child);
DCHECK_EQ(child->parent_, this);
« 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