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

Side by Side Diff: chrome/android/java/src/org/chromium/chrome/browser/fullscreen/ChromeFullscreenManager.java

Issue 2228823003: When possible, draw the toolbar shadow with the compositor (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase Created 4 years, 4 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 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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.chrome.browser.fullscreen; 5 package org.chromium.chrome.browser.fullscreen;
6 6
7 import android.animation.Animator; 7 import android.animation.Animator;
8 import android.animation.AnimatorListenerAdapter; 8 import android.animation.AnimatorListenerAdapter;
9 import android.animation.ObjectAnimator; 9 import android.animation.ObjectAnimator;
10 import android.app.Activity; 10 import android.app.Activity;
(...skipping 524 matching lines...) Expand 10 before | Expand all | Expand 10 after
535 * @param hide Whether or not to force the top controls Android view to hide . If this is 535 * @param hide Whether or not to force the top controls Android view to hide . If this is
536 * {@code false} the top controls Android view will show/hide ba sed on position, if 536 * {@code false} the top controls Android view will show/hide ba sed on position, if
537 * it is {@code true} the top controls Android view will always be hidden. 537 * it is {@code true} the top controls Android view will always be hidden.
538 */ 538 */
539 public void setHideTopControlsAndroidView(boolean hide) { 539 public void setHideTopControlsAndroidView(boolean hide) {
540 if (mTopControlsAndroidViewHidden == hide) return; 540 if (mTopControlsAndroidViewHidden == hide) return;
541 mTopControlsAndroidViewHidden = hide; 541 mTopControlsAndroidViewHidden = hide;
542 scheduleVisibilityUpdate(); 542 scheduleVisibilityUpdate();
543 } 543 }
544 544
545 /**
546 * @return True if the Android version of the top controls are hidden. This includes cases
547 * where the controls offset is < 0;
548 */
549 public boolean isTopControlsAndroidViewHidden() {
550 return mTopControlsAndroidViewHidden || getControlOffset() < 0;
551 }
552
545 private boolean shouldShowAndroidControls() { 553 private boolean shouldShowAndroidControls() {
546 if (mTopControlsAndroidViewHidden) return false; 554 if (mTopControlsAndroidViewHidden) return false;
547 555
548 boolean showControls = getControlOffset() == 0; 556 boolean showControls = getControlOffset() == 0;
549 ContentViewCore contentViewCore = getActiveContentViewCore(); 557 ContentViewCore contentViewCore = getActiveContentViewCore();
550 if (contentViewCore == null) return showControls; 558 if (contentViewCore == null) return showControls;
551 ViewGroup contentView = contentViewCore.getContainerView(); 559 ViewGroup contentView = contentViewCore.getContainerView();
552 560
553 for (int i = 0; i < contentView.getChildCount(); i++) { 561 for (int i = 0; i < contentView.getChildCount(); i++) {
554 View child = contentView.getChildAt(i); 562 View child = contentView.getChildAt(i);
(...skipping 180 matching lines...) Expand 10 before | Expand all | Expand 10 after
735 mControlAnimation.start(); 743 mControlAnimation.start();
736 mCurrentAnimationIsShowing = show; 744 mCurrentAnimationIsShowing = show;
737 } 745 }
738 746
739 @Override 747 @Override
740 public void onContentViewScrollingStateChanged(boolean scrolling) { 748 public void onContentViewScrollingStateChanged(boolean scrolling) {
741 mContentViewScrolling = scrolling; 749 mContentViewScrolling = scrolling;
742 if (!scrolling) updateVisuals(); 750 if (!scrolling) updateVisuals();
743 } 751 }
744 } 752 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698