Chromium Code Reviews| Index: chrome/android/java/src/org/chromium/chrome/browser/compositor/layouts/Layout.java |
| diff --git a/chrome/android/java/src/org/chromium/chrome/browser/compositor/layouts/Layout.java b/chrome/android/java/src/org/chromium/chrome/browser/compositor/layouts/Layout.java |
| index be3cf7b4c8ff4a0fc1129af23eef7b8393925ed4..c8e448196483d962dbb0004e12c061e4c84169ba 100644 |
| --- a/chrome/android/java/src/org/chromium/chrome/browser/compositor/layouts/Layout.java |
| +++ b/chrome/android/java/src/org/chromium/chrome/browser/compositor/layouts/Layout.java |
| @@ -99,7 +99,7 @@ public abstract class Layout implements TabContentManager.ThumbnailChangeListene |
| // Helpers |
| private final LayoutUpdateHost mUpdateHost; |
| protected final LayoutRenderHost mRenderHost; |
| - private EventFilter mEventFilter; |
| + protected EventFilter mEventFilter; |
|
Khushal
2017/03/22 21:20:09
I was thinking about just removing this and adding
mdjones
2017/03/23 17:18:55
I think this is a pretty good idea; it makes the e
David Trainor- moved to gerrit
2017/03/24 17:06:43
getEventFilter makes sense if you want the subclas
Khushal
2017/03/24 22:33:09
Done. StaticLayout returns null because it only ta
|
| /** The tabs currently being rendered as part of this layout. The tabs are |
| * drawn using the same ordering as this array. */ |
| @@ -120,14 +120,11 @@ public abstract class Layout implements TabContentManager.ThumbnailChangeListene |
| * @param context The current Android's context. |
| * @param updateHost The parent {@link LayoutUpdateHost}. |
| * @param renderHost The parent {@link LayoutRenderHost}. |
| - * @param eventFilter The {@link EventFilter} this {@link Layout} is listening to. |
| */ |
| - public Layout(Context context, LayoutUpdateHost updateHost, LayoutRenderHost renderHost, |
| - EventFilter eventFilter) { |
| + public Layout(Context context, LayoutUpdateHost updateHost, LayoutRenderHost renderHost) { |
| mContext = context; |
| mUpdateHost = updateHost; |
| mRenderHost = renderHost; |
| - mEventFilter = eventFilter; |
| // Invalid sizes |
| mWidthDp = -1; |
| @@ -572,69 +569,6 @@ public abstract class Layout implements TabContentManager.ThumbnailChangeListene |
| } |
| /** |
| - * Called on touch drag event. |
| - * @param time The current time of the app in ms. |
| - * @param x The y coordinate of the end of the drag event. |
| - * @param y The y coordinate of the end of the drag event. |
| - * @param deltaX The number of pixels dragged in the x direction. |
| - * @param deltaY The number of pixels dragged in the y direction. |
| - */ |
| - public void drag(long time, float x, float y, float deltaX, float deltaY) { } |
| - |
| - /** |
| - * Called on touch fling event. This is called before the onUpOrCancel event. |
| - * |
| - * @param time The current time of the app in ms. |
| - * @param x The y coordinate of the start of the fling event. |
| - * @param y The y coordinate of the start of the fling event. |
| - * @param velocityX The amount of velocity in the x direction. |
| - * @param velocityY The amount of velocity in the y direction. |
| - */ |
| - public void fling(long time, float x, float y, float velocityX, float velocityY) { } |
| - |
| - /** |
| - * Called on onDown event. |
| - * |
| - * @param time The time stamp in millisecond of the event. |
| - * @param x The x position of the event. |
| - * @param y The y position of the event. |
| - */ |
| - public void onDown(long time, float x, float y) { } |
| - |
| - /** |
| - * Called on long press touch event. |
| - * @param time The current time of the app in ms. |
| - * @param x The x coordinate of the position of the press event. |
| - * @param y The y coordinate of the position of the press event. |
| - */ |
| - public void onLongPress(long time, float x, float y) { } |
| - |
| - /** |
| - * Called on click. This is called before the onUpOrCancel event. |
| - * @param time The current time of the app in ms. |
| - * @param x The x coordinate of the position of the click. |
| - * @param y The y coordinate of the position of the click. |
| - */ |
| - public void click(long time, float x, float y) { } |
| - |
| - /** |
| - * Called on up or cancel touch events. This is called after the click and fling event if any. |
| - * @param time The current time of the app in ms. |
| - */ |
| - public void onUpOrCancel(long time) { } |
| - |
| - /** |
| - * Called when at least 2 touch events are detected. |
| - * @param time The current time of the app in ms. |
| - * @param x0 The x coordinate of the first touch event. |
| - * @param y0 The y coordinate of the first touch event. |
| - * @param x1 The x coordinate of the second touch event. |
| - * @param y1 The y coordinate of the second touch event. |
| - * @param firstEvent The pinch is the first of a sequence of pinch events. |
| - */ |
| - public void onPinch(long time, float x0, float y0, float x1, float y1, boolean firstEvent) { } |
| - |
| - /** |
| * Called by the LayoutManager when an animation should be killed. |
| */ |
| public void unstallImmediately() { } |
| @@ -1038,15 +972,6 @@ public abstract class Layout implements TabContentManager.ThumbnailChangeListene |
| } |
| /** |
| - * Setting this will only take effect the next time this layout is shown. If it is currently |
| - * showing the original filter will still be used. |
| - * @param filter |
| - */ |
| - public void setEventFilter(EventFilter filter) { |
| - mEventFilter = filter; |
| - } |
| - |
| - /** |
| * @param e The {@link MotionEvent} to consider. |
| * @param offsets The current touch offsets that should be applied to the |
| * {@link EventFilter}s. |
| @@ -1127,13 +1052,6 @@ public abstract class Layout implements TabContentManager.ThumbnailChangeListene |
| } |
| /** |
| - * @return Whether the tabstrip's event filter is enabled. |
| - */ |
| - public boolean isTabStripEventFilterEnabled() { |
|
Khushal
2017/03/22 21:20:09
This would always return true, so not necessary.
mdjones
2017/03/23 17:18:55
Also this had no place in this class and apparentl
|
| - return true; |
| - } |
| - |
| - /** |
| * Get an instance of {@link SceneLayer}. Any class inheriting {@link Layout} |
| * should override this function in order for other functions to work. |
| * |