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

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

Issue 2900463002: [Home] Add some NTP UI polish (Closed)
Patch Set: 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 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 10 matching lines...) Expand all
21 import org.chromium.chrome.browser.tabmodel.TabModelUtils; 21 import org.chromium.chrome.browser.tabmodel.TabModelUtils;
22 import org.chromium.chrome.browser.util.FeatureUtilities; 22 import org.chromium.chrome.browser.util.FeatureUtilities;
23 import org.chromium.ui.resources.dynamics.DynamicResourceLoader; 23 import org.chromium.ui.resources.dynamics.DynamicResourceLoader;
24 24
25 /** 25 /**
26 * {@link LayoutManagerChromePhone} is the specialization of {@link LayoutManage rChrome} for the 26 * {@link LayoutManagerChromePhone} is the specialization of {@link LayoutManage rChrome} for the
27 * phone. 27 * phone.
28 */ 28 */
29 public class LayoutManagerChromePhone extends LayoutManagerChrome { 29 public class LayoutManagerChromePhone extends LayoutManagerChrome {
30 // Layouts 30 // Layouts
31 private final Layout mSimpleAnimationLayout; 31 private final SimpleAnimationLayout mSimpleAnimationLayout;
32 32
33 /** 33 /**
34 * Creates an instance of a {@link LayoutManagerChromePhone}. 34 * Creates an instance of a {@link LayoutManagerChromePhone}.
35 * @param host A {@link LayoutManagerHost} instance. 35 * @param host A {@link LayoutManagerHost} instance.
36 */ 36 */
37 public LayoutManagerChromePhone(LayoutManagerHost host) { 37 public LayoutManagerChromePhone(LayoutManagerHost host) {
38 super(host, true); 38 super(host, true);
39 Context context = host.getContext(); 39 Context context = host.getContext();
40 LayoutRenderHost renderHost = host.getLayoutRenderHost(); 40 LayoutRenderHost renderHost = host.getLayoutRenderHost();
41 41
(...skipping 122 matching lines...) Expand 10 before | Expand all | Expand 10 after
164 164
165 @Override 165 @Override
166 public boolean isSwipeEnabled(ScrollDirection direction) { 166 public boolean isSwipeEnabled(ScrollDirection direction) {
167 if (direction == ScrollDirection.DOWN && FeatureUtilities.isChromeHo meEnabled()) { 167 if (direction == ScrollDirection.DOWN && FeatureUtilities.isChromeHo meEnabled()) {
168 return false; 168 return false;
169 } 169 }
170 170
171 return super.isSwipeEnabled(direction); 171 return super.isSwipeEnabled(direction);
172 } 172 }
173 } 173 }
174
175 /**
176 * Sets whether the foreground tab animation is disabled.
177 * TODO(twellington): Remove this after Chrome Home NTP animations are compl ete.
178 * @param disabled Whether the foreground tab animation should be disabled.
179 */
180 public void setForegroundTabAnimationDisabled(boolean disabled) {
181 mSimpleAnimationLayout.setForegroundTabAnimationDisabled(disabled);
182 }
174 } 183 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698