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

Unified Diff: android_webview/java/src/org/chromium/android_webview/AwSettings.java

Issue 1025933002: Convert force video overlay to preference (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: review Created 5 years, 9 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 | « no previous file | android_webview/javatests/src/org/chromium/android_webview/test/AwContentsClientFullScreenTest.java » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: android_webview/java/src/org/chromium/android_webview/AwSettings.java
diff --git a/android_webview/java/src/org/chromium/android_webview/AwSettings.java b/android_webview/java/src/org/chromium/android_webview/AwSettings.java
index b36cd4becf5a24c027af288797db5185f0dbeb74..27280b45ecfefa1012ac6abb17d5d92683707640 100644
--- a/android_webview/java/src/org/chromium/android_webview/AwSettings.java
+++ b/android_webview/java/src/org/chromium/android_webview/AwSettings.java
@@ -93,6 +93,7 @@ public class AwSettings {
private boolean mEnableSupportedHardwareAcceleratedFeatures = false;
private int mMixedContentMode = MIXED_CONTENT_NEVER_ALLOW;
private boolean mVideoOverlayForEmbeddedVideoEnabled = false;
+ private boolean mForceVideoOverlayForTests = false;
private boolean mOffscreenPreRaster = false;
// Although this bit is stored on AwSettings it is actually controlled via the CookieManager.
@@ -1703,6 +1704,29 @@ public class AwSettings {
return mVideoOverlayForEmbeddedVideoEnabled;
}
+ @VisibleForTesting
+ public void setForceVideoOverlayForTests(final boolean enabled) {
+ synchronized (mAwSettingsLock) {
+ if (mForceVideoOverlayForTests != enabled) {
+ mForceVideoOverlayForTests = enabled;
+ mEventHandler.runOnUiThreadBlockingAndLocked(new Runnable() {
+ @Override
+ public void run() {
+ if (mNativeAwSettings != 0) {
+ nativeUpdateRendererPreferencesLocked(mNativeAwSettings);
+ }
+ }
+ });
+ }
+ }
+ }
+
+ @CalledByNative
+ private boolean getForceVideoOverlayForTests() {
+ assert Thread.holdsLock(mAwSettingsLock);
+ return mForceVideoOverlayForTests;
+ }
+
@CalledByNative
private boolean supportsDoubleTapZoomLocked() {
assert Thread.holdsLock(mAwSettingsLock);
« no previous file with comments | « no previous file | android_webview/javatests/src/org/chromium/android_webview/test/AwContentsClientFullScreenTest.java » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698