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

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: Created 3 years, 8 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 95 matching lines...) Expand 10 before | Expand all | Expand 10 after
106 public SwipableOverlayView(Context context, AttributeSet attrs) { 106 public SwipableOverlayView(Context context, AttributeSet attrs) {
107 super(context, attrs); 107 super(context, attrs);
108 mGestureStateListener = createGestureStateListener(); 108 mGestureStateListener = createGestureStateListener();
109 mGestureState = GESTURE_NONE; 109 mGestureState = GESTURE_NONE;
110 mLayoutChangeListener = createLayoutChangeListener(); 110 mLayoutChangeListener = createLayoutChangeListener();
111 mAnimatorListener = createAnimatorListener(); 111 mAnimatorListener = createAnimatorListener();
112 mInterpolator = new DecelerateInterpolator(1.0f); 112 mInterpolator = new DecelerateInterpolator(1.0f);
113 113
114 // We make this view 'draw' to provide a placeholder for its animations. 114 // We make this view 'draw' to provide a placeholder for its animations.
115 setWillNotDraw(false); 115 setWillNotDraw(false);
116
117 setClipChildren(false);
116 } 118 }
117 119
118 /** 120 /**
119 * Watches the given ContentViewCore for scrolling changes. 121 * Watches the given ContentViewCore for scrolling changes.
120 */ 122 */
121 public void setContentViewCore(ContentViewCore contentViewCore) { 123 public void setContentViewCore(ContentViewCore contentViewCore) {
122 if (mContentViewCore != null) { 124 if (mContentViewCore != null) {
123 mContentViewCore.removeGestureStateListener(mGestureStateListener); 125 mContentViewCore.removeGestureStateListener(mGestureStateListener);
124 } 126 }
125 127
(...skipping 247 matching lines...) Expand 10 before | Expand all | Expand 10 after
373 public boolean gatherTransparentRegion(Region region) { 375 public boolean gatherTransparentRegion(Region region) {
374 float translationY = getTranslationY(); 376 float translationY = getTranslationY();
375 setTranslationY(0); 377 setTranslationY(0);
376 boolean result = super.gatherTransparentRegion(region); 378 boolean result = super.gatherTransparentRegion(region);
377 // Restoring TranslationY invalidates this view unnecessarily. However, this function 379 // Restoring TranslationY invalidates this view unnecessarily. However, this function
378 // is called as part of layout, which implies a full redraw is about to occur anyway. 380 // is called as part of layout, which implies a full redraw is about to occur anyway.
379 setTranslationY(translationY); 381 setTranslationY(translationY);
380 return result; 382 return result;
381 } 383 }
382 } 384 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698