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

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

Issue 2878543003: Hook up Reader Mode InfoBar (Closed)
Patch Set: fix tests Created 3 years, 6 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;
11 import org.chromium.chrome.browser.compositor.layouts.eventfilter.ScrollDirectio n; 11 import org.chromium.chrome.browser.compositor.layouts.eventfilter.ScrollDirectio n;
12 import org.chromium.chrome.browser.compositor.layouts.phone.SimpleAnimationLayou t; 12 import org.chromium.chrome.browser.compositor.layouts.phone.SimpleAnimationLayou t;
13 import org.chromium.chrome.browser.compositor.overlays.SceneOverlay; 13 import org.chromium.chrome.browser.compositor.overlays.SceneOverlay;
14 import org.chromium.chrome.browser.contextualsearch.ContextualSearchManagementDe legate; 14 import org.chromium.chrome.browser.contextualsearch.ContextualSearchManagementDe legate;
15 import org.chromium.chrome.browser.device.DeviceClassManager; 15 import org.chromium.chrome.browser.device.DeviceClassManager;
16 import org.chromium.chrome.browser.dom_distiller.ReaderModeManagerDelegate;
17 import org.chromium.chrome.browser.tab.Tab; 16 import org.chromium.chrome.browser.tab.Tab;
18 import org.chromium.chrome.browser.tabmodel.TabCreatorManager; 17 import org.chromium.chrome.browser.tabmodel.TabCreatorManager;
19 import org.chromium.chrome.browser.tabmodel.TabModel.TabLaunchType; 18 import org.chromium.chrome.browser.tabmodel.TabModel.TabLaunchType;
20 import org.chromium.chrome.browser.tabmodel.TabModelSelector; 19 import org.chromium.chrome.browser.tabmodel.TabModelSelector;
21 import org.chromium.chrome.browser.tabmodel.TabModelUtils; 20 import org.chromium.chrome.browser.tabmodel.TabModelUtils;
22 import org.chromium.chrome.browser.util.FeatureUtilities; 21 import org.chromium.chrome.browser.util.FeatureUtilities;
23 import org.chromium.ui.resources.dynamics.DynamicResourceLoader; 22 import org.chromium.ui.resources.dynamics.DynamicResourceLoader;
24 23
25 /** 24 /**
26 * {@link LayoutManagerChromePhone} is the specialization of {@link LayoutManage rChrome} for the 25 * {@link LayoutManagerChromePhone} is the specialization of {@link LayoutManage rChrome} for the
(...skipping 22 matching lines...) Expand all
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 }
54 53
55 @Override 54 @Override
56 public void init(TabModelSelector selector, TabCreatorManager creator, 55 public void init(TabModelSelector selector, TabCreatorManager creator,
57 TabContentManager content, ViewGroup androidContentContainer, 56 TabContentManager content, ViewGroup androidContentContainer,
58 ContextualSearchManagementDelegate contextualSearchDelegate, 57 ContextualSearchManagementDelegate contextualSearchDelegate,
59 ReaderModeManagerDelegate readerModeDelegate,
60 DynamicResourceLoader dynamicResourceLoader) { 58 DynamicResourceLoader dynamicResourceLoader) {
61 // Initialize Layouts 59 // Initialize Layouts
62 mSimpleAnimationLayout.setTabModelSelector(selector, content); 60 mSimpleAnimationLayout.setTabModelSelector(selector, content);
63 61
64 super.init(selector, creator, content, androidContentContainer, contextu alSearchDelegate, 62 super.init(selector, creator, content, androidContentContainer, contextu alSearchDelegate,
65 readerModeDelegate, dynamicResourceLoader); 63 dynamicResourceLoader);
66 } 64 }
67 65
68 @Override 66 @Override
69 protected LayoutManagerTabModelObserver createTabModelObserver() { 67 protected LayoutManagerTabModelObserver createTabModelObserver() {
70 return new LayoutManagerTabModelObserver() { 68 return new LayoutManagerTabModelObserver() {
71 @Override 69 @Override
72 public void willCloseTab(Tab tab, boolean animate) { 70 public void willCloseTab(Tab tab, boolean animate) {
73 super.willCloseTab(tab, animate); 71 super.willCloseTab(tab, animate);
74 if (animate) tabClosing(tab.getId()); 72 if (animate) tabClosing(tab.getId());
75 } 73 }
(...skipping 98 matching lines...) Expand 10 before | Expand all | Expand 10 after
174 172
175 /** 173 /**
176 * Sets whether the foreground tab animation is disabled. 174 * Sets whether the foreground tab animation is disabled.
177 * TODO(twellington): Remove this after Chrome Home NTP animations are compl ete. 175 * TODO(twellington): Remove this after Chrome Home NTP animations are compl ete.
178 * @param disabled Whether the foreground tab animation should be disabled. 176 * @param disabled Whether the foreground tab animation should be disabled.
179 */ 177 */
180 public void setForegroundTabAnimationDisabled(boolean disabled) { 178 public void setForegroundTabAnimationDisabled(boolean disabled) {
181 mSimpleAnimationLayout.setForegroundTabAnimationDisabled(disabled); 179 mSimpleAnimationLayout.setForegroundTabAnimationDisabled(disabled);
182 } 180 }
183 } 181 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698