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

Unified Diff: ui/android/window_android.cc

Issue 2136373002: Make WindowAndroid a ViewAndroid (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@view3
Patch Set: Make WindowAndroid a ViewAndroid Created 4 years, 5 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/window_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/window_android.cc
diff --git a/ui/android/window_android.cc b/ui/android/window_android.cc
index 11cde005a3bc1493719e25a87eb7c34f41e72785..c437c662912a0c1b2c4f66a6a4eecd213411c3d5 100644
--- a/ui/android/window_android.cc
+++ b/ui/android/window_android.cc
@@ -37,6 +37,7 @@ bool WindowAndroid::RegisterWindowAndroid(JNIEnv* env) {
}
WindowAndroid::~WindowAndroid() {
+ DCHECK(parent_ == nullptr) << "WindowAndroid must be a root view.";
DCHECK(!compositor_);
}
@@ -153,6 +154,11 @@ void WindowAndroid::StartDragAndDrop(
jimage.obj());
}
+WindowAndroid* WindowAndroid::GetWindowAndroid() const {
+ DCHECK(parent_ == nullptr);
+ return const_cast<WindowAndroid*>(this);
+}
+
// ----------------------------------------------------------------------------
// Native JNI methods
// ----------------------------------------------------------------------------
« no previous file with comments | « ui/android/window_android.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698