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

Unified Diff: ui/platform_window/android/java/src/org/chromium/ui/PlatformWindowAndroid.java

Issue 1455793005: Adding a way to associate Android Activities with PlatformWindowAndroid (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@auraclank_upstream_native_widget
Patch Set: Created 5 years, 1 month 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
Index: ui/platform_window/android/java/src/org/chromium/ui/PlatformWindowAndroid.java
diff --git a/ui/platform_window/android/java/src/org/chromium/ui/PlatformWindowAndroid.java b/ui/platform_window/android/java/src/org/chromium/ui/PlatformWindowAndroid.java
index 9c77fce65121c5d8513a3da562444f5a40ff429f..e28c4864f1480278b6e4852756aa872979e3193c 100644
--- a/ui/platform_window/android/java/src/org/chromium/ui/PlatformWindowAndroid.java
+++ b/ui/platform_window/android/java/src/org/chromium/ui/PlatformWindowAndroid.java
@@ -31,10 +31,11 @@ public class PlatformWindowAndroid extends SurfaceView {
@CalledByNative
public static PlatformWindowAndroid createForActivity(
Activity activity, long nativeViewport, long nativeImeController) {
- PlatformWindowAndroid rv =
+ PlatformWindowAndroid pwa =
new PlatformWindowAndroid(activity, nativeViewport, nativeImeController);
- activity.setContentView(rv);
- return rv;
+ activity.setContentView(pwa);
+ nativeJavaPlatformWindowCreated(nativeViewport);
mfomitchev 2015/11/19 20:57:05 Note this call
+ return pwa;
}
sadrul 2015/11/20 18:21:09 It's not clear who will be calling createForActivi
mfomitchev 2015/11/20 18:27:15 Please see my comment in window_tree_host_platform
sadrul 2015/11/20 18:32:35 Oh sorry, missed that. Added a comment there.
public PlatformWindowAndroid(Context context, long nativeViewport, long nativeImeController) {
@@ -181,6 +182,8 @@ public class PlatformWindowAndroid extends SurfaceView {
private static native void nativeDestroy(long nativePlatformWindowAndroid);
+ private static native void nativeJavaPlatformWindowCreated(long nativePlatformWindowAndroid);
+
private static native void nativeSurfaceCreated(
long nativePlatformWindowAndroid, Surface surface, float devicePixelRatio);

Powered by Google App Engine
This is Rietveld 408576698