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

Side by Side Diff: chrome/android/java/src/org/chromium/chrome/browser/banners/SwipableOverlayView.java

Issue 2846663002: Peek new infobars behind existing ones (Closed)
Patch Set: undo tab changes Created 3 years, 7 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.banners; 5 package org.chromium.chrome.browser.banners;
6 6
7 import android.animation.Animator; 7 import android.animation.Animator;
8 import android.animation.Animator.AnimatorListener; 8 import android.animation.Animator.AnimatorListener;
9 import android.animation.AnimatorListenerAdapter; 9 import android.animation.AnimatorListenerAdapter;
10 import android.animation.ObjectAnimator; 10 import android.animation.ObjectAnimator;
(...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after
89 public SwipableOverlayView(Context context, AttributeSet attrs) { 89 public SwipableOverlayView(Context context, AttributeSet attrs) {
90 super(context, attrs); 90 super(context, attrs);
91 mGestureStateListener = createGestureStateListener(); 91 mGestureStateListener = createGestureStateListener();
92 mGestureState = GESTURE_NONE; 92 mGestureState = GESTURE_NONE;
93 mLayoutChangeListener = createLayoutChangeListener(); 93 mLayoutChangeListener = createLayoutChangeListener();
94 mAnimatorListener = createAnimatorListener(); 94 mAnimatorListener = createAnimatorListener();
95 mInterpolator = new DecelerateInterpolator(1.0f); 95 mInterpolator = new DecelerateInterpolator(1.0f);
96 96
97 // We make this view 'draw' to provide a placeholder for its animations. 97 // We make this view 'draw' to provide a placeholder for its animations.
98 setWillNotDraw(false); 98 setWillNotDraw(false);
99
100 setClipChildren(false);
99 } 101 }
100 102
101 /** 103 /**
102 * Watches the given ContentViewCore for scrolling changes. 104 * Watches the given ContentViewCore for scrolling changes.
103 */ 105 */
104 public void setContentViewCore(ContentViewCore contentViewCore) { 106 public void setContentViewCore(ContentViewCore contentViewCore) {
105 if (mContentViewCore != null) { 107 if (mContentViewCore != null) {
106 mContentViewCore.removeGestureStateListener(mGestureStateListener); 108 mContentViewCore.removeGestureStateListener(mGestureStateListener);
107 } 109 }
108 110
(...skipping 250 matching lines...) Expand 10 before | Expand all | Expand 10 after
359 public boolean gatherTransparentRegion(Region region) { 361 public boolean gatherTransparentRegion(Region region) {
360 float translationY = getTranslationY(); 362 float translationY = getTranslationY();
361 setTranslationY(0); 363 setTranslationY(0);
362 boolean result = super.gatherTransparentRegion(region); 364 boolean result = super.gatherTransparentRegion(region);
363 // Restoring TranslationY invalidates this view unnecessarily. However, this function 365 // Restoring TranslationY invalidates this view unnecessarily. However, this function
364 // is called as part of layout, which implies a full redraw is about to occur anyway. 366 // is called as part of layout, which implies a full redraw is about to occur anyway.
365 setTranslationY(translationY); 367 setTranslationY(translationY);
366 return result; 368 return result;
367 } 369 }
368 } 370 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698