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

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

Issue 2696303004: Android screen orientation lock should lock/unlock the same activity (Closed)
Patch Set: Add data deps to chrome_test_java Created 3 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 unified diff | Download patch
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.app.Activity; 7 import android.app.Activity;
8 import android.content.Context; 8 import android.content.Context;
9 import android.graphics.drawable.ClipDrawable; 9 import android.graphics.drawable.ClipDrawable;
10 import android.text.TextUtils; 10 import android.text.TextUtils;
(...skipping 338 matching lines...) Expand 10 before | Expand all | Expand 10 after
349 } 349 }
350 }; 350 };
351 } 351 }
352 352
353 @CalledByNative 353 @CalledByNative
354 public ContentVideoViewEmbedder getContentVideoViewEmbedder() { 354 public ContentVideoViewEmbedder getContentVideoViewEmbedder() {
355 return new ActivityContentVideoViewEmbedder((Activity) getContext()) { 355 return new ActivityContentVideoViewEmbedder((Activity) getContext()) {
356 @Override 356 @Override
357 public void enterFullscreenVideo(View view, boolean isVideoLoaded) { 357 public void enterFullscreenVideo(View view, boolean isVideoLoaded) {
358 super.enterFullscreenVideo(view, isVideoLoaded); 358 super.enterFullscreenVideo(view, isVideoLoaded);
359 mContentViewRenderView.setOverlayVideoMode(true); 359 if (mContentViewRenderView != null) {
360 mContentViewRenderView.setOverlayVideoMode(true);
361 }
360 } 362 }
361 363
362 @Override 364 @Override
363 public void exitFullscreenVideo() { 365 public void exitFullscreenVideo() {
364 super.exitFullscreenVideo(); 366 super.exitFullscreenVideo();
365 mContentViewRenderView.setOverlayVideoMode(false); 367 if (mContentViewRenderView != null) {
368 mContentViewRenderView.setOverlayVideoMode(false);
369 }
366 } 370 }
367 }; 371 };
368 } 372 }
369 373
370 /** 374 /**
371 * Enable/Disable navigation(Prev/Next) button if navigation is allowed/disa llowed 375 * Enable/Disable navigation(Prev/Next) button if navigation is allowed/disa llowed
372 * in respective direction. 376 * in respective direction.
373 * @param controlId Id of button to update 377 * @param controlId Id of button to update
374 * @param enabled enable/disable value 378 * @param enabled enable/disable value
375 */ 379 */
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
408 Context.INPUT_METHOD_SERVICE); 412 Context.INPUT_METHOD_SERVICE);
409 if (visible) { 413 if (visible) {
410 imm.showSoftInput(mUrlTextView, InputMethodManager.SHOW_IMPLICIT); 414 imm.showSoftInput(mUrlTextView, InputMethodManager.SHOW_IMPLICIT);
411 } else { 415 } else {
412 imm.hideSoftInputFromWindow(mUrlTextView.getWindowToken(), 0); 416 imm.hideSoftInputFromWindow(mUrlTextView.getWindowToken(), 0);
413 } 417 }
414 } 418 }
415 419
416 private static native void nativeCloseShell(long shellPtr); 420 private static native void nativeCloseShell(long shellPtr);
417 } 421 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698