Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 /* Copyright (C) 2012 Google Inc. All rights reserved. | 1 /* Copyright (C) 2012 Google Inc. All rights reserved. |
| 2 * | 2 * |
| 3 * Redistribution and use in source and binary forms, with or without | 3 * Redistribution and use in source and binary forms, with or without |
| 4 * modification, are permitted provided that the following conditions | 4 * modification, are permitted provided that the following conditions |
| 5 * are met: | 5 * are met: |
| 6 * 1. Redistributions of source code must retain the above copyright | 6 * 1. Redistributions of source code must retain the above copyright |
| 7 * notice, this list of conditions and the following disclaimer. | 7 * notice, this list of conditions and the following disclaimer. |
| 8 * 2. Redistributions in binary form must reproduce the above copyright | 8 * 2. Redistributions in binary form must reproduce the above copyright |
| 9 * notice, this list of conditions and the following disclaimer in the | 9 * notice, this list of conditions and the following disclaimer in the |
| 10 * documentation and/or other materials provided with the distribution. | 10 * documentation and/or other materials provided with the distribution. |
| (...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 46 // Returns ScrollStarted if the layer at the coordinates can be scrolled, | 46 // Returns ScrollStarted if the layer at the coordinates can be scrolled, |
| 47 // ScrollOnMainThread if the scroll event should instead be delegated to the | 47 // ScrollOnMainThread if the scroll event should instead be delegated to the |
| 48 // main thread, or ScrollIgnored if there is nothing to be scrolled at the | 48 // main thread, or ScrollIgnored if there is nothing to be scrolled at the |
| 49 // given coordinates. | 49 // given coordinates. |
| 50 virtual ScrollStatus scrollBegin(WebPoint, ScrollInputType) = 0; | 50 virtual ScrollStatus scrollBegin(WebPoint, ScrollInputType) = 0; |
| 51 | 51 |
| 52 // Scroll the selected layer starting at the given window coordinate. If | 52 // Scroll the selected layer starting at the given window coordinate. If |
| 53 // there is no room to move the layer in the requested direction, its first | 53 // there is no room to move the layer in the requested direction, its first |
| 54 // ancestor layer that can be scrolled will be moved instead. Should only be | 54 // ancestor layer that can be scrolled will be moved instead. Should only be |
| 55 // called if scrollBegin() returned ScrollStarted. | 55 // called if scrollBegin() returned ScrollStarted. |
| 56 virtual void scrollBy(WebPoint, WebSize) = 0; | 56 virtual bool scrollBy(WebPoint, WebSize) = 0; |
|
danakj
2012/11/14 01:55:32
You should add a comment about the return value.
rjkroege
2012/11/14 17:00:26
And: it would be nice to use enums for these sorts
| |
| 57 | 57 |
| 58 // Stop scrolling the selected layer. Should only be called if scrollBegin() | 58 // Stop scrolling the selected layer. Should only be called if scrollBegin() |
| 59 // returned ScrollStarted. | 59 // returned ScrollStarted. |
| 60 virtual void scrollEnd() = 0; | 60 virtual void scrollEnd() = 0; |
| 61 | 61 |
| 62 virtual void pinchGestureBegin() = 0; | 62 virtual void pinchGestureBegin() = 0; |
| 63 virtual void pinchGestureUpdate(float magnifyDelta, WebPoint anchor) = 0; | 63 virtual void pinchGestureUpdate(float magnifyDelta, WebPoint anchor) = 0; |
| 64 virtual void pinchGestureEnd() = 0; | 64 virtual void pinchGestureEnd() = 0; |
| 65 | 65 |
| 66 virtual void startPageScaleAnimation(WebSize targetPosition, | 66 virtual void startPageScaleAnimation(WebSize targetPosition, |
| 67 bool anchorPoint, | 67 bool anchorPoint, |
| 68 float pageScale, | 68 float pageScale, |
| 69 double startTime, | 69 double startTime, |
| 70 double duration) = 0; | 70 double duration) = 0; |
| 71 | 71 |
| 72 // Request another callback to WebInputHandler::animate(). | 72 // Request another callback to WebInputHandler::animate(). |
| 73 virtual void scheduleAnimation() = 0; | 73 virtual void scheduleAnimation() = 0; |
| 74 | 74 |
| 75 protected: | 75 protected: |
| 76 virtual ~WebInputHandlerClient() { } | 76 virtual ~WebInputHandlerClient() { } |
| 77 }; | 77 }; |
| 78 | 78 |
| 79 } | 79 } |
| 80 | 80 |
| 81 #endif | 81 #endif |
| OLD | NEW |