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

Unified Diff: sky/engine/platform/scroll/Scrollbar.cpp

Issue 874823002: Move GestureEvent to NewEventDispatcher (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Build fixes Created 5 years, 11 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « sky/engine/platform/scroll/Scrollbar.h ('k') | sky/engine/public/web/WebViewClient.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sky/engine/platform/scroll/Scrollbar.cpp
diff --git a/sky/engine/platform/scroll/Scrollbar.cpp b/sky/engine/platform/scroll/Scrollbar.cpp
index 6942f888a7fa45d88b4f334c3790e4a163d9d8af..de65c077d3733950fd088b312799686dcdfa7418 100644
--- a/sky/engine/platform/scroll/Scrollbar.cpp
+++ b/sky/engine/platform/scroll/Scrollbar.cpp
@@ -26,7 +26,6 @@
#include "sky/engine/config.h"
#include "sky/engine/platform/scroll/Scrollbar.h"
-#include "sky/engine/platform/PlatformGestureEvent.h"
#include "sky/engine/platform/graphics/GraphicsContext.h"
#include "sky/engine/platform/scroll/ScrollAnimator.h"
#include "sky/engine/platform/scroll/ScrollableArea.h"
@@ -242,50 +241,6 @@ void Scrollbar::setPressedPart(ScrollbarPart part)
m_pressedPart = part;
}
-bool Scrollbar::gestureEvent(const PlatformGestureEvent& evt)
-{
- switch (evt.type()) {
- case PlatformEvent::GestureTapDown:
- // FIXME(sky): Is setting the pressed part needed since we only have overlay scrollbars?
- setPressedPart(NoPart);
- m_pressedPos = orientation() == HorizontalScrollbar ? convertFromContainingView(evt.position()).x() : convertFromContainingView(evt.position()).y();
- return true;
- case PlatformEvent::GestureTapDownCancel:
- case PlatformEvent::GestureScrollBegin:
- if (m_pressedPart != ThumbPart)
- return false;
- m_scrollPos = m_pressedPos;
- return true;
- case PlatformEvent::GestureScrollUpdate:
- case PlatformEvent::GestureScrollUpdateWithoutPropagation:
- if (m_pressedPart != ThumbPart)
- return false;
- m_scrollPos += orientation() == HorizontalScrollbar ? evt.deltaX() : evt.deltaY();
- moveThumb(m_scrollPos);
- return true;
- case PlatformEvent::GestureScrollEnd:
- case PlatformEvent::GestureLongPress:
- case PlatformEvent::GestureFlingStart:
- m_scrollPos = 0;
- m_pressedPos = 0;
- setPressedPart(NoPart);
- return false;
- case PlatformEvent::GestureTap: {
- if (m_pressedPart != ThumbPart && m_pressedPart != NoPart && m_scrollableArea
- && m_scrollableArea->scroll(pressedPartScrollDirection(), pressedPartScrollGranularity())) {
- return true;
- }
- m_scrollPos = 0;
- m_pressedPos = 0;
- setPressedPart(NoPart);
- return false;
- }
- default:
- // By default, we assume that gestures don't deselect the scrollbar.
- return true;
- }
-}
-
void Scrollbar::mouseEntered()
{
if (m_scrollableArea)
« no previous file with comments | « sky/engine/platform/scroll/Scrollbar.h ('k') | sky/engine/public/web/WebViewClient.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698