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

Side by Side Diff: chrome/android/java/src/org/chromium/chrome/browser/compositor/layouts/StaticLayout.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.graphics.RectF; 8 import android.graphics.RectF;
9 import android.os.Handler; 9 import android.os.Handler;
10 10
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after
54 private final UnstallRunnable mUnstallRunnable; 54 private final UnstallRunnable mUnstallRunnable;
55 private final Handler mHandler; 55 private final Handler mHandler;
56 private boolean mUnstalling; 56 private boolean mUnstalling;
57 private StaticTabSceneLayer mSceneLayer; 57 private StaticTabSceneLayer mSceneLayer;
58 58
59 /** 59 /**
60 * Creates an instance of the {@link StaticLayout}. 60 * Creates an instance of the {@link StaticLayout}.
61 * @param context The current Android's context. 61 * @param context The current Android's context.
62 * @param updateHost The {@link LayoutUpdateHost} view for this lay out. 62 * @param updateHost The {@link LayoutUpdateHost} view for this lay out.
63 * @param renderHost The {@link LayoutRenderHost} view for this lay out. 63 * @param renderHost The {@link LayoutRenderHost} view for this lay out.
64 * @param eventFilter The {@link EventFilter} that is needed for thi s view.
65 * @param panelManager The {@link OverlayPanelManager} responsible fo r showing panels. 64 * @param panelManager The {@link OverlayPanelManager} responsible fo r showing panels.
66 */ 65 */
67 public StaticLayout(Context context, LayoutUpdateHost updateHost, LayoutRend erHost renderHost, 66 public StaticLayout(Context context, LayoutUpdateHost updateHost, LayoutRend erHost renderHost,
68 EventFilter eventFilter, OverlayPanelManager panelManager) { 67 EventFilter eventFilter, OverlayPanelManager panelManager) {
69 super(context, updateHost, renderHost, eventFilter); 68 super(context, updateHost, renderHost);
70 69
71 mHandler = new Handler(); 70 mHandler = new Handler();
72 mUnstallRunnable = new UnstallRunnable(); 71 mUnstallRunnable = new UnstallRunnable();
73 mUnstalling = false; 72 mUnstalling = false;
74 mSceneLayer = new StaticTabSceneLayer(R.id.control_container); 73 mSceneLayer = new StaticTabSceneLayer(R.id.control_container);
75 } 74 }
76 75
77 /** 76 /**
78 * @param handlesTabLifecycles Whether or not this {@link Layout} should han dle tab closing and 77 * @param handlesTabLifecycles Whether or not this {@link Layout} should han dle tab closing and
79 * creating events. 78 * creating events.
(...skipping 127 matching lines...) Expand 10 before | Expand all | Expand 10 after
207 public boolean shouldDisplayContentOverlay() { 206 public boolean shouldDisplayContentOverlay() {
208 return true; 207 return true;
209 } 208 }
210 209
211 @Override 210 @Override
212 public boolean isTabInteractive() { 211 public boolean isTabInteractive() {
213 return mLayoutTabs != null && mLayoutTabs.length > 0; 212 return mLayoutTabs != null && mLayoutTabs.length > 0;
214 } 213 }
215 214
216 @Override 215 @Override
216 protected EventFilter getEventFilter() {
217 return null;
218 }
219
220 @Override
217 protected SceneLayer getSceneLayer() { 221 protected SceneLayer getSceneLayer() {
218 return mSceneLayer; 222 return mSceneLayer;
219 } 223 }
220 224
221 @Override 225 @Override
222 protected void updateSceneLayer(RectF viewport, RectF contentViewport, 226 protected void updateSceneLayer(RectF viewport, RectF contentViewport,
223 LayerTitleCache layerTitleCache, TabContentManager tabContentManager , 227 LayerTitleCache layerTitleCache, TabContentManager tabContentManager ,
224 ResourceManager resourceManager, ChromeFullscreenManager fullscreenM anager) { 228 ResourceManager resourceManager, ChromeFullscreenManager fullscreenM anager) {
225 super.updateSceneLayer(viewport, contentViewport, layerTitleCache, tabCo ntentManager, 229 super.updateSceneLayer(viewport, contentViewport, layerTitleCache, tabCo ntentManager,
226 resourceManager, fullscreenManager); 230 resourceManager, fullscreenManager);
(...skipping 18 matching lines...) Expand all
245 } 249 }
246 250
247 @Override 251 @Override
248 public void destroy() { 252 public void destroy() {
249 if (mSceneLayer != null) { 253 if (mSceneLayer != null) {
250 mSceneLayer.destroy(); 254 mSceneLayer.destroy();
251 mSceneLayer = null; 255 mSceneLayer = null;
252 } 256 }
253 } 257 }
254 } 258 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698