| OLD | NEW |
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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 #ifndef CONTENT_COMMON_INPUT_SYNTHETIC_WEB_INPUT_EVENT_BUILDERS_H_ | 5 #ifndef CONTENT_COMMON_INPUT_SYNTHETIC_WEB_INPUT_EVENT_BUILDERS_H_ |
| 6 #define CONTENT_COMMON_INPUT_SYNTHETIC_WEB_INPUT_EVENT_BUILDERS_H_ | 6 #define CONTENT_COMMON_INPUT_SYNTHETIC_WEB_INPUT_EVENT_BUILDERS_H_ |
| 7 | 7 |
| 8 #include "base/time/time.h" | 8 #include "base/time/time.h" |
| 9 #include "content/common/content_export.h" | 9 #include "content/common/content_export.h" |
| 10 #include "third_party/WebKit/public/web/WebInputEvent.h" | 10 #include "third_party/WebKit/public/web/WebInputEvent.h" |
| (...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 59 | 59 |
| 60 class CONTENT_EXPORT SyntheticWebTouchEvent | 60 class CONTENT_EXPORT SyntheticWebTouchEvent |
| 61 : public NON_EXPORTED_BASE(blink::WebTouchEvent) { | 61 : public NON_EXPORTED_BASE(blink::WebTouchEvent) { |
| 62 public: | 62 public: |
| 63 SyntheticWebTouchEvent(); | 63 SyntheticWebTouchEvent(); |
| 64 | 64 |
| 65 // Mark all the points as stationary, and remove any released points. | 65 // Mark all the points as stationary, and remove any released points. |
| 66 void ResetPoints(); | 66 void ResetPoints(); |
| 67 | 67 |
| 68 // Adds an additional point to the touch list, returning the point's index. | 68 // Adds an additional point to the touch list, returning the point's index. |
| 69 int PressPoint(int x, int y); | 69 int PressPoint(float x, float y); |
| 70 void MovePoint(int index, int x, int y); | 70 void MovePoint(int index, float x, float y); |
| 71 void ReleasePoint(int index); | 71 void ReleasePoint(int index); |
| 72 void CancelPoint(int index); | 72 void CancelPoint(int index); |
| 73 | 73 |
| 74 void SetTimestamp(base::TimeDelta timestamp); | 74 void SetTimestamp(base::TimeDelta timestamp); |
| 75 }; | 75 }; |
| 76 | 76 |
| 77 class CONTENT_EXPORT SyntheticWebTouchEventBuilder { | 77 class CONTENT_EXPORT SyntheticWebTouchEventBuilder { |
| 78 public: | 78 public: |
| 79 static SyntheticWebTouchEvent Build(blink::WebInputEvent::Type type); | 79 static SyntheticWebTouchEvent Build(blink::WebInputEvent::Type type); |
| 80 }; | 80 }; |
| 81 | 81 |
| 82 } // namespace content | 82 } // namespace content |
| 83 | 83 |
| 84 #endif // CONTENT_COMMON_INPUT_SYNTHETIC_WEB_INPUT_EVENT_BUILDERS_H_ | 84 #endif // CONTENT_COMMON_INPUT_SYNTHETIC_WEB_INPUT_EVENT_BUILDERS_H_ |
| OLD | NEW |