OLD | NEW |
---|---|
1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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.toolbar; | 5 package org.chromium.chrome.browser.toolbar; |
6 | 6 |
7 import android.content.Context; | 7 import android.content.Context; |
8 import android.graphics.Canvas; | 8 import android.graphics.Canvas; |
9 import android.graphics.PorterDuff; | 9 import android.graphics.PorterDuff; |
10 import android.graphics.Rect; | 10 import android.graphics.Rect; |
(...skipping 95 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
106 @Override | 106 @Override |
107 public boolean gatherTransparentRegion(Region region) { | 107 public boolean gatherTransparentRegion(Region region) { |
108 // Reset the translation on the control container before attempting to c ompute the | 108 // Reset the translation on the control container before attempting to c ompute the |
109 // transparent region. | 109 // transparent region. |
110 float translateY = getTranslationY(); | 110 float translateY = getTranslationY(); |
111 setTranslationY(0); | 111 setTranslationY(0); |
112 | 112 |
113 ViewUtils.gatherTransparentRegionsForOpaqueView(this, region); | 113 ViewUtils.gatherTransparentRegionsForOpaqueView(this, region); |
114 | 114 |
115 setTranslationY(translateY); | 115 setTranslationY(translateY); |
116 region.setEmpty(); | |
Ian Wen
2017/01/11 19:46:53
Q: what's this for?
mdjones
2017/01/12 21:26:57
I moved this over to BottomSheet.java. I have it s
| |
116 | 117 |
117 return true; | 118 return true; |
118 } | 119 } |
119 | 120 |
120 /** | 121 /** |
121 * Invalidate the entire capturing bitmap region. | 122 * Invalidate the entire capturing bitmap region. |
122 */ | 123 */ |
123 public void invalidateBitmap() { | 124 public void invalidateBitmap() { |
124 ((ToolbarViewResourceAdapter) getToolbarResourceAdapter()).forceInvalida te(); | 125 ((ToolbarViewResourceAdapter) getToolbarResourceAdapter()).forceInvalida te(); |
125 } | 126 } |
(...skipping 149 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
275 | 276 |
276 @Override | 277 @Override |
277 public boolean shouldRecognizeSwipe(MotionEvent e1, MotionEvent e2) { | 278 public boolean shouldRecognizeSwipe(MotionEvent e1, MotionEvent e2) { |
278 if (isOnTabStrip(e1)) return false; | 279 if (isOnTabStrip(e1)) return false; |
279 if (mToolbar.shouldIgnoreSwipeGesture()) return false; | 280 if (mToolbar.shouldIgnoreSwipeGesture()) return false; |
280 if (UiUtils.isKeyboardShowing(getContext(), ToolbarControlContainer. this)) return false; | 281 if (UiUtils.isKeyboardShowing(getContext(), ToolbarControlContainer. this)) return false; |
281 return true; | 282 return true; |
282 } | 283 } |
283 } | 284 } |
284 } | 285 } |
OLD | NEW |