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

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: 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
« ui/android/view_android.cc ('K') | « 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 970ddd0415d12fa59ce06c5648f26e87c981b339..4bd0f4d665804fe8014703a8b8d4fab465bb79ce 100644
--- a/ui/android/window_android.cc
+++ b/ui/android/window_android.cc
@@ -36,6 +36,7 @@ bool WindowAndroid::RegisterWindowAndroid(JNIEnv* env) {
}
WindowAndroid::~WindowAndroid() {
+ DCHECK(parent_ == nullptr) << "WindowAndroid must be a root view.";
DCHECK(!compositor_);
}
@@ -142,6 +143,11 @@ bool WindowAndroid::CanRequestPermission(const std::string& permission) {
base::android::ConvertUTF8ToJavaString(env, permission).obj());
}
+WindowAndroid* WindowAndroid::GetWindowAndroid() {
+ DCHECK(parent_ == nullptr);
+ return this;
+}
+
// ----------------------------------------------------------------------------
// Native JNI methods
// ----------------------------------------------------------------------------
« ui/android/view_android.cc ('K') | « ui/android/window_android.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698