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

Unified Diff: ui/android/view_android.cc

Issue 2638973004: Use ContainerView for PowerSaveBlocker to keep screen on (Closed)
Patch Set: fix tests/2 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
« no previous file with comments | « 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..6c55a7bf9df724ce0eea47170c138cd146ba2d85 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 nullptr;
+
+ JNIEnv* env = base::android::AttachCurrentThread();
+ return Java_ViewAndroidDelegate_getContainerView(env, delegate);
+}
+
void ViewAndroid::RemoveChild(ViewAndroid* child) {
DCHECK(child);
DCHECK_EQ(child->parent_, this);
« no previous file with comments | « ui/android/view_android.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698