| Index: cc/input_handler.h
|
| diff --git a/cc/input_handler.h b/cc/input_handler.h
|
| index 712fa6088f5825297ada59b124dd83f34b54f8db..e6314b57d4718abbc7fc109e6c4e381340e6f925 100644
|
| --- a/cc/input_handler.h
|
| +++ b/cc/input_handler.h
|
| @@ -27,70 +27,72 @@ namespace cc {
|
| // The InputHandler is constructed with a InputHandlerClient, which is the
|
| // interface by which the handler can manipulate the LayerTree.
|
| class CC_EXPORT InputHandlerClient {
|
| -public:
|
| - enum ScrollStatus { ScrollOnMainThread, ScrollStarted, ScrollIgnored };
|
| - enum ScrollInputType { Gesture, Wheel, NonBubblingGesture };
|
| -
|
| - // Selects a layer to be scrolled at a given point in viewport (logical
|
| - // pixel) coordinates. Returns ScrollStarted if the layer at the coordinates
|
| - // can be scrolled, ScrollOnMainThread if the scroll event should instead be
|
| - // delegated to the main thread, or ScrollIgnored if there is nothing to be
|
| - // scrolled at the given coordinates.
|
| - virtual ScrollStatus scrollBegin(gfx::Point, ScrollInputType) = 0;
|
| -
|
| - // Scroll the selected layer starting at the given position. If the scroll
|
| - // type given to scrollBegin was a gesture, then the scroll point and delta
|
| - // should be in viewport (logical pixel) coordinates. Otherwise they are in
|
| - // scrolling layer's (logical pixel) space. If there is no room to move the
|
| - // layer in the requested direction, its first ancestor layer that can be
|
| - // scrolled will be moved instead. If no layer can be moved in the requested
|
| - // direction at all, then false is returned. If any layer is moved, then
|
| - // true is returned.
|
| - // Should only be called if scrollBegin() returned ScrollStarted.
|
| - virtual bool scrollBy(const gfx::Point&, const gfx::Vector2dF&) = 0;
|
| -
|
| - // Stop scrolling the selected layer. Should only be called if scrollBegin()
|
| - // returned ScrollStarted.
|
| - virtual void scrollEnd() = 0;
|
| -
|
| - virtual void pinchGestureBegin() = 0;
|
| - virtual void pinchGestureUpdate(float magnifyDelta, gfx::Point anchor) = 0;
|
| - virtual void pinchGestureEnd() = 0;
|
| -
|
| - virtual void startPageScaleAnimation(gfx::Vector2d targetOffset,
|
| - bool anchorPoint,
|
| - float pageScale,
|
| - base::TimeTicks startTime,
|
| - base::TimeDelta duration) = 0;
|
| -
|
| - // Request another callback to InputHandler::animate().
|
| - virtual void scheduleAnimation() = 0;
|
| -
|
| - virtual bool haveTouchEventHandlersAt(const gfx::Point&) = 0;
|
| -
|
| -protected:
|
| - InputHandlerClient() { }
|
| - virtual ~InputHandlerClient() { }
|
| -
|
| -private:
|
| - DISALLOW_COPY_AND_ASSIGN(InputHandlerClient);
|
| + public:
|
| + enum ScrollStatus { ScrollOnMainThread, ScrollStarted, ScrollIgnored };
|
| + enum ScrollInputType { Gesture, Wheel, NonBubblingGesture };
|
| +
|
| + // Selects a layer to be scrolled at a given point in viewport (logical
|
| + // pixel) coordinates. Returns ScrollStarted if the layer at the coordinates
|
| + // can be scrolled, ScrollOnMainThread if the scroll event should instead be
|
| + // delegated to the main thread, or ScrollIgnored if there is nothing to be
|
| + // scrolled at the given coordinates.
|
| + virtual ScrollStatus ScrollBegin(gfx::Point viewport_point,
|
| + ScrollInputType type) = 0;
|
| +
|
| + // Scroll the selected layer starting at the given position. If the scroll
|
| + // type given to scrollBegin was a gesture, then the scroll point and delta
|
| + // should be in viewport (logical pixel) coordinates. Otherwise they are in
|
| + // scrolling layer's (logical pixel) space. If there is no room to move the
|
| + // layer in the requested direction, its first ancestor layer that can be
|
| + // scrolled will be moved instead. If no layer can be moved in the requested
|
| + // direction at all, then false is returned. If any layer is moved, then
|
| + // true is returned.
|
| + // Should only be called if ScrollBegin() returned ScrollStarted.
|
| + virtual bool ScrollBy(gfx::Point viewport_point,
|
| + gfx::Vector2dF scroll_delta) = 0;
|
| +
|
| + // Stop scrolling the selected layer. Should only be called if ScrollBegin()
|
| + // returned ScrollStarted.
|
| + virtual void ScrollEnd() = 0;
|
| +
|
| + virtual void PinchGestureBegin() = 0;
|
| + virtual void PinchGestureUpdate(float magnify_delta, gfx::Point anchor) = 0;
|
| + virtual void PinchGestureEnd() = 0;
|
| +
|
| + virtual void StartPageScaleAnimation(gfx::Vector2d target_offset,
|
| + bool anchor_point,
|
| + float page_scale,
|
| + base::TimeTicks start_time,
|
| + base::TimeDelta duration) = 0;
|
| +
|
| + // Request another callback to InputHandler::Animate().
|
| + virtual void ScheduleAnimation() = 0;
|
| +
|
| + virtual bool HaveTouchEventHandlersAt(gfx::Point viewport_point) = 0;
|
| +
|
| + protected:
|
| + InputHandlerClient() {}
|
| + virtual ~InputHandlerClient() {}
|
| +
|
| + private:
|
| + DISALLOW_COPY_AND_ASSIGN(InputHandlerClient);
|
| };
|
|
|
| class CC_EXPORT InputHandler {
|
| -public:
|
| - virtual ~InputHandler() { }
|
| + public:
|
| + virtual ~InputHandler() {}
|
|
|
| - virtual void bindToClient(InputHandlerClient*) = 0;
|
| - virtual void animate(base::TimeTicks time) = 0;
|
| - virtual void mainThreadHasStoppedFlinging() = 0;
|
| + virtual void BindToClient(InputHandlerClient* client) = 0;
|
| + virtual void Animate(base::TimeTicks time) = 0;
|
| + virtual void MainThreadHasStoppedFlinging() = 0;
|
|
|
| -protected:
|
| - InputHandler() { }
|
| + protected:
|
| + InputHandler() {}
|
|
|
| -private:
|
| - DISALLOW_COPY_AND_ASSIGN(InputHandler);
|
| + private:
|
| + DISALLOW_COPY_AND_ASSIGN(InputHandler);
|
| };
|
|
|
| -}
|
| +} // namespace cc
|
|
|
| #endif // CC_INPUT_HANDLER_H_
|
|
|