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

Unified Diff: ui/android/java/src/org/chromium/ui/base/WindowAndroid.java

Issue 2765443004: AndroidOverlay implementation using Dialog. (Closed)
Patch Set: fixed test Created 3 years, 8 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 | « media/mojo/interfaces/android_overlay.mojom ('k') | ui/android/window_android.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/android/java/src/org/chromium/ui/base/WindowAndroid.java
diff --git a/ui/android/java/src/org/chromium/ui/base/WindowAndroid.java b/ui/android/java/src/org/chromium/ui/base/WindowAndroid.java
index d9771f74edd7707bc3043936bc23f221dfcc358f..962e610524218aac6b71d81020190f55396a2974 100644
--- a/ui/android/java/src/org/chromium/ui/base/WindowAndroid.java
+++ b/ui/android/java/src/org/chromium/ui/base/WindowAndroid.java
@@ -16,11 +16,13 @@ import android.content.Intent;
import android.content.pm.PackageManager;
import android.os.Build;
import android.os.Bundle;
+import android.os.IBinder;
import android.os.Process;
import android.util.Log;
import android.util.SparseArray;
import android.view.View;
import android.view.ViewGroup;
+import android.view.Window;
import android.view.accessibility.AccessibilityManager;
import org.chromium.base.ApiCompatibilityUtils;
@@ -726,6 +728,20 @@ public class WindowAndroid {
}
/**
+ * Return the current window token, or null.
+ */
+ @CalledByNative
+ private IBinder getWindowToken() {
+ Activity activity = activityFromContext(mContextRef.get());
+ if (activity == null) return null;
+ Window window = activity.getWindow();
+ if (window == null) return null;
+ View decorView = window.peekDecorView();
+ if (decorView == null) return null;
+ return decorView.getWindowToken();
+ }
+
+ /**
* Update whether the placeholder is 'drawn' based on whether an animation is running
* or touch exploration is enabled - if either of those are true, we call
* setWillNotDraw(false) to ensure that the animation is drawn over the SurfaceView,
« no previous file with comments | « media/mojo/interfaces/android_overlay.mojom ('k') | ui/android/window_android.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698