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

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: fix 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
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..c887d9cf0813d31596a0159c175f6595349880b1 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() {
mnaganov (inactive) 2015/03/23 17:44:22 Should be maybe pass the value for mForceVideoOver
boliu 2015/03/23 18:57:30 Done.
+ synchronized (mAwSettingsLock) {
+ if (!mForceVideoOverlayForTests) {
+ mForceVideoOverlayForTests = true;
+ 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);

Powered by Google App Engine
This is Rietveld 408576698