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

Side by Side Diff: chrome/android/java/src/org/chromium/chrome/browser/compositor/layouts/LayoutManagerChromePhone.java

Issue 2774443002: chrome/android: Push EventFilters into the Layout implementations. (Closed)
Patch Set: fix for re-landing 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 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.compositor.layouts; 5 package org.chromium.chrome.browser.compositor.layouts;
6 6
7 import android.content.Context; 7 import android.content.Context;
8 import android.view.ViewGroup; 8 import android.view.ViewGroup;
9 9
10 import org.chromium.chrome.browser.compositor.layouts.content.TabContentManager; 10 import org.chromium.chrome.browser.compositor.layouts.content.TabContentManager;
(...skipping 21 matching lines...) Expand all
32 /** 32 /**
33 * Creates an instance of a {@link LayoutManagerChromePhone}. 33 * Creates an instance of a {@link LayoutManagerChromePhone}.
34 * @param host A {@link LayoutManagerHost} instance. 34 * @param host A {@link LayoutManagerHost} instance.
35 */ 35 */
36 public LayoutManagerChromePhone(LayoutManagerHost host) { 36 public LayoutManagerChromePhone(LayoutManagerHost host) {
37 super(host, true); 37 super(host, true);
38 Context context = host.getContext(); 38 Context context = host.getContext();
39 LayoutRenderHost renderHost = host.getLayoutRenderHost(); 39 LayoutRenderHost renderHost = host.getLayoutRenderHost();
40 40
41 // Build Layouts 41 // Build Layouts
42 mSimpleAnimationLayout = 42 mSimpleAnimationLayout = new SimpleAnimationLayout(context, this, render Host);
43 new SimpleAnimationLayout(context, this, renderHost, mBlackHoleE ventFilter);
44 43
45 // Set up layout parameters 44 // Set up layout parameters
46 mStaticLayout.setLayoutHandlesTabLifecycles(false); 45 mStaticLayout.setLayoutHandlesTabLifecycles(false);
47 mToolbarSwipeLayout.setMovesToolbar(true); 46 mToolbarSwipeLayout.setMovesToolbar(true);
48 } 47 }
49 48
50 @Override 49 @Override
51 protected ToolbarSwipeHandler createToolbarSwipeHandler(LayoutProvider provi der) { 50 protected ToolbarSwipeHandler createToolbarSwipeHandler(LayoutProvider provi der) {
52 return new PhoneToolbarSwipeHandler(provider); 51 return new PhoneToolbarSwipeHandler(provider);
53 } 52 }
(...skipping 110 matching lines...) Expand 10 before | Expand all | Expand 10 after
164 @Override 163 @Override
165 public boolean isSwipeEnabled(ScrollDirection direction) { 164 public boolean isSwipeEnabled(ScrollDirection direction) {
166 if (direction == ScrollDirection.DOWN && FeatureUtilities.isChromeHo meEnabled()) { 165 if (direction == ScrollDirection.DOWN && FeatureUtilities.isChromeHo meEnabled()) {
167 return false; 166 return false;
168 } 167 }
169 168
170 return super.isSwipeEnabled(direction); 169 return super.isSwipeEnabled(direction);
171 } 170 }
172 } 171 }
173 } 172 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698