OLD | NEW |
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 337 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
348 return mTopControlsPermanentlyHidden; | 348 return mTopControlsPermanentlyHidden; |
349 } | 349 } |
350 | 350 |
351 /** | 351 /** |
352 * @return Whether the top controls should be drawn as a texture. | 352 * @return Whether the top controls should be drawn as a texture. |
353 */ | 353 */ |
354 public boolean drawControlsAsTexture() { | 354 public boolean drawControlsAsTexture() { |
355 return getControlOffset() > -mControlContainerHeight; | 355 return getControlOffset() > -mControlContainerHeight; |
356 } | 356 } |
357 | 357 |
358 /** | 358 @Override |
359 * @return The height of the top controls in pixels. | |
360 */ | |
361 public int getTopControlsHeight() { | 359 public int getTopControlsHeight() { |
362 return mControlContainerHeight; | 360 return mControlContainerHeight; |
363 } | 361 } |
364 | 362 |
365 @Override | 363 @Override |
366 public float getContentOffset() { | 364 public float getContentOffset() { |
367 if (mTopControlsPermanentlyHidden) return 0; | 365 if (mTopControlsPermanentlyHidden) return 0; |
368 return rendererContentOffset(); | 366 return rendererContentOffset(); |
369 } | 367 } |
370 | 368 |
(...skipping 364 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
735 mControlAnimation.start(); | 733 mControlAnimation.start(); |
736 mCurrentAnimationIsShowing = show; | 734 mCurrentAnimationIsShowing = show; |
737 } | 735 } |
738 | 736 |
739 @Override | 737 @Override |
740 public void onContentViewScrollingStateChanged(boolean scrolling) { | 738 public void onContentViewScrollingStateChanged(boolean scrolling) { |
741 mContentViewScrolling = scrolling; | 739 mContentViewScrolling = scrolling; |
742 if (!scrolling) updateVisuals(); | 740 if (!scrolling) updateVisuals(); |
743 } | 741 } |
744 } | 742 } |
OLD | NEW |