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

Side by Side Diff: android_webview/java/src/org/chromium/android_webview/AwContentViewClient.java

Issue 667143002: [aw] Software mode tests for fullscreen API. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@fixPowerBlockerNonMedia
Patch Set: Rebase and move check for real Created 6 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 unified diff | 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 »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 package org.chromium.android_webview; 5 package org.chromium.android_webview;
6 6
7 import android.content.Context; 7 import android.content.Context;
8 import android.view.KeyEvent; 8 import android.view.KeyEvent;
9 import android.view.View; 9 import android.view.View;
10 import android.webkit.URLUtil; 10 import android.webkit.URLUtil;
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after
59 } 59 }
60 60
61 @Override 61 @Override
62 public boolean shouldBlockMediaRequest(String url) { 62 public boolean shouldBlockMediaRequest(String url) {
63 return mAwSettings != null 63 return mAwSettings != null
64 ? mAwSettings.getBlockNetworkLoads() && URLUtil.isNetworkUrl(url ) : true; 64 ? mAwSettings.getBlockNetworkLoads() && URLUtil.isNetworkUrl(url ) : true;
65 } 65 }
66 66
67 @Override 67 @Override
68 public void enterFullscreenVideo(View videoView) { 68 public void enterFullscreenVideo(View videoView) {
69 // enterFullscreenVideo will only be called after enterFullscreen. 69 if (mCustomView == null) {
70 assert mCustomView != null; 70 // enterFullscreenVideo will only be called after enterFullscreen, b ut
71 // in this case exitFullscreen has been invoked in between them.
72 // TODO(igsolla): Fix http://crbug/425926 and replace with assert.
73 return;
74 }
71 mCustomView.addView(videoView, 0); 75 mCustomView.addView(videoView, 0);
72 } 76 }
73 77
74 @Override 78 @Override
75 public void exitFullscreenVideo() { 79 public void exitFullscreenVideo() {
76 // Intentional no-op 80 // Intentional no-op
77 } 81 }
78 82
79 @Override 83 @Override
80 public View getVideoLoadingProgressView() { 84 public View getVideoLoadingProgressView() {
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
112 * Called to show the web contents in embedded mode. 116 * Called to show the web contents in embedded mode.
113 */ 117 */
114 public void exitFullscreen() { 118 public void exitFullscreen() {
115 if (mCustomView != null) { 119 if (mCustomView != null) {
116 mAwContents.exitFullScreen(); 120 mAwContents.exitFullScreen();
117 mAwContentsClient.onHideCustomView(); 121 mAwContentsClient.onHideCustomView();
118 mCustomView = null; 122 mCustomView = null;
119 } 123 }
120 } 124 }
121 } 125 }
OLDNEW
« 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