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

Side by Side Diff: content/shell/android/java/src/org/chromium/content_shell/Shell.java

Issue 627513002: Support fullscreen video for content shell (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 2 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 unified diff | Download patch
« no previous file with comments | « content/public/android/java/src/org/chromium/content_public/browser/WebContents.java ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2012 The Chromium Authors. All rights reserved. 1 // Copyright 2012 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.content_shell; 5 package org.chromium.content_shell;
6 6
7 import android.content.Context; 7 import android.content.Context;
8 import android.graphics.drawable.ClipDrawable; 8 import android.graphics.drawable.ClipDrawable;
9 import android.text.TextUtils; 9 import android.text.TextUtils;
10 import android.util.AttributeSet; 10 import android.util.AttributeSet;
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after
56 private ImageButton mStopButton; 56 private ImageButton mStopButton;
57 private ImageButton mReloadButton; 57 private ImageButton mReloadButton;
58 58
59 private ClipDrawable mProgressDrawable; 59 private ClipDrawable mProgressDrawable;
60 60
61 private long mNativeShell; 61 private long mNativeShell;
62 private ContentViewRenderView mContentViewRenderView; 62 private ContentViewRenderView mContentViewRenderView;
63 private WindowAndroid mWindow; 63 private WindowAndroid mWindow;
64 64
65 private boolean mLoading = false; 65 private boolean mLoading = false;
66 private boolean mIsFullscreen = false;
66 67
67 /** 68 /**
68 * Constructor for inflating via XML. 69 * Constructor for inflating via XML.
69 */ 70 */
70 public Shell(Context context, AttributeSet attrs) { 71 public Shell(Context context, AttributeSet attrs) {
71 super(context, attrs); 72 super(context, attrs);
72 } 73 }
73 74
74 /** 75 /**
75 * Set the SurfaceView being renderered to as soon as it is available. 76 * Set the SurfaceView being renderered to as soon as it is available.
(...skipping 178 matching lines...) Expand 10 before | Expand all | Expand 10 after
254 @SuppressWarnings("unused") 255 @SuppressWarnings("unused")
255 @CalledByNative 256 @CalledByNative
256 private void onLoadProgressChanged(double progress) { 257 private void onLoadProgressChanged(double progress) {
257 removeCallbacks(mClearProgressRunnable); 258 removeCallbacks(mClearProgressRunnable);
258 mProgressDrawable.setLevel((int) (10000.0 * progress)); 259 mProgressDrawable.setLevel((int) (10000.0 * progress));
259 if (progress == 1.0) postDelayed(mClearProgressRunnable, COMPLETED_PROGR ESS_TIMEOUT_MS); 260 if (progress == 1.0) postDelayed(mClearProgressRunnable, COMPLETED_PROGR ESS_TIMEOUT_MS);
260 } 261 }
261 262
262 @CalledByNative 263 @CalledByNative
263 private void toggleFullscreenModeForTab(boolean enterFullscreen) { 264 private void toggleFullscreenModeForTab(boolean enterFullscreen) {
265 mIsFullscreen = enterFullscreen;
266 mWebContents.wasResized();
Ted C 2014/10/02 21:52:45 Why is this necessary? Could we just do: mUrlText
qinmin 2014/10/02 22:44:30 Done. Set the whole toolbar's visibility to false
264 } 267 }
265 268
266 @CalledByNative 269 @CalledByNative
267 private boolean isFullscreenForTabOrPending() { 270 private boolean isFullscreenForTabOrPending() {
268 return false; 271 return mIsFullscreen;
269 } 272 }
270 273
271 @SuppressWarnings("unused") 274 @SuppressWarnings("unused")
272 @CalledByNative 275 @CalledByNative
273 private void setIsLoading(boolean loading) { 276 private void setIsLoading(boolean loading) {
274 mLoading = loading; 277 mLoading = loading;
275 } 278 }
276 279
277 /** 280 /**
278 * Initializes the ContentView based on the native tab contents pointer pass ed in. 281 * Initializes the ContentView based on the native tab contents pointer pass ed in.
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after
335 Context.INPUT_METHOD_SERVICE); 338 Context.INPUT_METHOD_SERVICE);
336 if (visible) { 339 if (visible) {
337 imm.showSoftInput(mUrlTextView, InputMethodManager.SHOW_IMPLICIT); 340 imm.showSoftInput(mUrlTextView, InputMethodManager.SHOW_IMPLICIT);
338 } else { 341 } else {
339 imm.hideSoftInputFromWindow(mUrlTextView.getWindowToken(), 0); 342 imm.hideSoftInputFromWindow(mUrlTextView.getWindowToken(), 0);
340 } 343 }
341 } 344 }
342 345
343 private static native void nativeCloseShell(long shellPtr); 346 private static native void nativeCloseShell(long shellPtr);
344 } 347 }
OLDNEW
« no previous file with comments | « content/public/android/java/src/org/chromium/content_public/browser/WebContents.java ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698