| 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.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 Loading... |
| 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 = new SimpleAnimationLayout(context, this, render
Host); | 42 mSimpleAnimationLayout = |
| 43 new SimpleAnimationLayout(context, this, renderHost, mBlackHoleE
ventFilter); |
| 43 | 44 |
| 44 // Set up layout parameters | 45 // Set up layout parameters |
| 45 mStaticLayout.setLayoutHandlesTabLifecycles(false); | 46 mStaticLayout.setLayoutHandlesTabLifecycles(false); |
| 46 mToolbarSwipeLayout.setMovesToolbar(true); | 47 mToolbarSwipeLayout.setMovesToolbar(true); |
| 47 } | 48 } |
| 48 | 49 |
| 49 @Override | 50 @Override |
| 50 protected ToolbarSwipeHandler createToolbarSwipeHandler(LayoutProvider provi
der) { | 51 protected ToolbarSwipeHandler createToolbarSwipeHandler(LayoutProvider provi
der) { |
| 51 return new PhoneToolbarSwipeHandler(provider); | 52 return new PhoneToolbarSwipeHandler(provider); |
| 52 } | 53 } |
| (...skipping 110 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 163 @Override | 164 @Override |
| 164 public boolean isSwipeEnabled(ScrollDirection direction) { | 165 public boolean isSwipeEnabled(ScrollDirection direction) { |
| 165 if (direction == ScrollDirection.DOWN && FeatureUtilities.isChromeHo
meEnabled()) { | 166 if (direction == ScrollDirection.DOWN && FeatureUtilities.isChromeHo
meEnabled()) { |
| 166 return false; | 167 return false; |
| 167 } | 168 } |
| 168 | 169 |
| 169 return super.isSwipeEnabled(direction); | 170 return super.isSwipeEnabled(direction); |
| 170 } | 171 } |
| 171 } | 172 } |
| 172 } | 173 } |
| OLD | NEW |