diff options
author | michaelbai@chromium.org <michaelbai@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-04-11 13:33:01 +0000 |
---|---|---|
committer | michaelbai@chromium.org <michaelbai@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-04-11 13:33:01 +0000 |
commit | 91b3c6d11b55d4f4b8d493f0a596db6be5cfbd3b (patch) | |
tree | 0377a7ceffa578bf6152d7114725edbdc6644304 /android_webview | |
parent | 9c93fd86ce511a6fa0a854a80065d19c63507115 (diff) | |
download | chromium_src-91b3c6d11b55d4f4b8d493f0a596db6be5cfbd3b.zip chromium_src-91b3c6d11b55d4f4b8d493f0a596db6be5cfbd3b.tar.gz chromium_src-91b3c6d11b55d4f4b8d493f0a596db6be5cfbd3b.tar.bz2 |
Calling 2 param onShowCustomView.
BUG=http://b/8589376
Review URL: https://chromiumcodereview.appspot.com/13828010
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@193634 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'android_webview')
4 files changed, 14 insertions, 15 deletions
diff --git a/android_webview/java/src/org/chromium/android_webview/AwContentVideoViewDelegate.java b/android_webview/java/src/org/chromium/android_webview/AwContentVideoViewDelegate.java index c2520c8..6a82e62 100644 --- a/android_webview/java/src/org/chromium/android_webview/AwContentVideoViewDelegate.java +++ b/android_webview/java/src/org/chromium/android_webview/AwContentVideoViewDelegate.java @@ -32,9 +32,7 @@ public class AwContentVideoViewDelegate implements ContentVideoViewContextDelega // TODO: we need to invoke ContentVideoView.onDestroyContentVideoView() here. } }; - mAwContentsClient.onShowCustomView(view, - ActivityInfo.SCREEN_ORIENTATION_UNSPECIFIED, - cb); + mAwContentsClient.onShowCustomView(view, cb); } @Override diff --git a/android_webview/java/src/org/chromium/android_webview/AwContentsClient.java b/android_webview/java/src/org/chromium/android_webview/AwContentsClient.java index 9473d8f..3862b6d 100644 --- a/android_webview/java/src/org/chromium/android_webview/AwContentsClient.java +++ b/android_webview/java/src/org/chromium/android_webview/AwContentsClient.java @@ -4,6 +4,7 @@ package org.chromium.android_webview; +import android.content.pm.ActivityInfo; import android.graphics.Bitmap; import android.graphics.Picture; import android.graphics.Rect; @@ -286,20 +287,22 @@ public abstract class AwContentsClient extends ContentViewClient { public abstract void onReceivedError(int errorCode, String description, String failingUrl); - public abstract void onShowCustomView(View view, - int requestedOrientation, WebChromeClient.CustomViewCallback callback); - - // TODO (michaelbai): This method should be abstract, having empty body here - // makes the merge to the Android easy. - public void onHideCustomView() { + // TODO (michaelbai): Remove this method once the same method remove from + // WebViewContentsClientAdapter. + public void onShowCustomView(View view, + int requestedOrientation, WebChromeClient.CustomViewCallback callback) { } // TODO (michaelbai): This method should be abstract, having empty body here // makes the merge to the Android easy. - public Bitmap getDefaultVideoPoster() { - return null; + public void onShowCustomView(View view, WebChromeClient.CustomViewCallback callback) { + onShowCustomView(view, ActivityInfo.SCREEN_ORIENTATION_UNSPECIFIED, callback); } + public abstract void onHideCustomView(); + + public abstract Bitmap getDefaultVideoPoster(); + //-------------------------------------------------------------------------------------------- // Other WebView-specific methods //-------------------------------------------------------------------------------------------- diff --git a/android_webview/javatests/src/org/chromium/android_webview/test/FullScreenVideoTestAwContentsClient.java b/android_webview/javatests/src/org/chromium/android_webview/test/FullScreenVideoTestAwContentsClient.java index 31d6639..e00b5ff 100644 --- a/android_webview/javatests/src/org/chromium/android_webview/test/FullScreenVideoTestAwContentsClient.java +++ b/android_webview/javatests/src/org/chromium/android_webview/test/FullScreenVideoTestAwContentsClient.java @@ -32,8 +32,7 @@ public class FullScreenVideoTestAwContentsClient extends TestAwContentsClient { } @Override - public void onShowCustomView(View view, int requestedOrientation, - WebChromeClient.CustomViewCallback callback) { + public void onShowCustomView(View view, WebChromeClient.CustomViewCallback callback) { mActivity.getWindow().setFlags( WindowManager.LayoutParams.FLAG_FULLSCREEN, WindowManager.LayoutParams.FLAG_FULLSCREEN); diff --git a/android_webview/test/shell/src/org/chromium/android_webview/test/NullContentsClient.java b/android_webview/test/shell/src/org/chromium/android_webview/test/NullContentsClient.java index 5806319..e3cac4a 100644 --- a/android_webview/test/shell/src/org/chromium/android_webview/test/NullContentsClient.java +++ b/android_webview/test/shell/src/org/chromium/android_webview/test/NullContentsClient.java @@ -157,8 +157,7 @@ public class NullContentsClient extends AwContentsClient { } @Override - public void onShowCustomView(View view, - int requestedOrientation, WebChromeClient.CustomViewCallback callback) { + public void onShowCustomView(View view, WebChromeClient.CustomViewCallback callback) { } @Override |