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

Unified Diff: ui/android/window_android.cc

Issue 1578353002: Pull the Activity context from WindowAndroid if possible (Closed) Base URL: https://chromium.googlesource.com/a/chromium/src.git@2564
Patch Set: Created 4 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/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 5fe7779a2716b142c9818f9a3b8dde01d9d0cd9e..0ba6e6ccd121c4121766e798ea545bd36d1a0431 100644
--- a/ui/android/window_android.cc
+++ b/ui/android/window_android.cc
@@ -38,6 +38,13 @@ WindowAndroid::~WindowAndroid() {
DCHECK(!compositor_);
}
+WindowAndroid* WindowAndroid::createForTesting() {
+ JNIEnv* env = AttachCurrentThread();
+ jobject context = base::android::GetApplicationContext();
+ return new WindowAndroid(
+ env, Java_WindowAndroid_createForTesting(env, context).obj());
+}
+
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