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

Unified Diff: ui/android/window_android.cc

Issue 2270323004: Add BlimpView to a Chrome tab when Blimp is enabled. (Closed)
Patch Set: addressed nit, renamed CreateForTesting and piped through touch handling Created 4 years, 4 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 c53762c15137f715b790a1b2f0f170fc23c10a17..67c6cc1e4dad73072e6e88dc6f7bd723569301b0 100644
--- a/ui/android/window_android.cc
+++ b/ui/android/window_android.cc
@@ -40,15 +40,20 @@ bool WindowAndroid::RegisterWindowAndroid(JNIEnv* env) {
WindowAndroid::~WindowAndroid() {
DCHECK(parent_ == nullptr) << "WindowAndroid must be a root view.";
DCHECK(!compositor_);
+ Java_WindowAndroid_clearNativePointer(AttachCurrentThread(), GetJavaObject());
}
-WindowAndroid* WindowAndroid::createForTesting() {
+WindowAndroid* WindowAndroid::CreateForTesting() {
JNIEnv* env = AttachCurrentThread();
const JavaRef<jobject>& context = base::android::GetApplicationContext();
return new WindowAndroid(
env, Java_WindowAndroid_createForTesting(env, context).obj());
}
+void WindowAndroid::DestroyForTesting() {
+ delete this;
+}
+
void WindowAndroid::OnCompositingDidCommit() {
FOR_EACH_OBSERVER(WindowAndroidObserver,
observer_list_,
« 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