| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2012 Google Inc. All rights reserved. | 2 * Copyright (C) 2012 Google Inc. All rights reserved. |
| 3 * | 3 * |
| 4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
| 5 * modification, are permitted provided that the following conditions are | 5 * modification, are permitted provided that the following conditions are |
| 6 * met: | 6 * met: |
| 7 * | 7 * |
| 8 * * Redistributions of source code must retain the above copyright | 8 * * Redistributions of source code must retain the above copyright |
| 9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
| 10 * * Redistributions in binary form must reproduce the above | 10 * * Redistributions in binary form must reproduce the above |
| (...skipping 24 matching lines...) Expand all Loading... |
| 35 #include "core/frame/LocalFrame.h" | 35 #include "core/frame/LocalFrame.h" |
| 36 #include "core/inspector/InspectorClient.h" | 36 #include "core/inspector/InspectorClient.h" |
| 37 #include "core/page/Chrome.h" | 37 #include "core/page/Chrome.h" |
| 38 #include "core/page/EventHandler.h" | 38 #include "core/page/EventHandler.h" |
| 39 #include "core/page/Page.h" | 39 #include "core/page/Page.h" |
| 40 #include "platform/JSONValues.h" | 40 #include "platform/JSONValues.h" |
| 41 #include "platform/PlatformKeyboardEvent.h" | 41 #include "platform/PlatformKeyboardEvent.h" |
| 42 #include "platform/PlatformMouseEvent.h" | 42 #include "platform/PlatformMouseEvent.h" |
| 43 #include "platform/PlatformTouchEvent.h" | 43 #include "platform/PlatformTouchEvent.h" |
| 44 #include "platform/PlatformTouchPoint.h" | 44 #include "platform/PlatformTouchPoint.h" |
| 45 #include "platform/geometry/FloatSize.h" |
| 45 #include "platform/geometry/IntPoint.h" | 46 #include "platform/geometry/IntPoint.h" |
| 46 #include "platform/geometry/IntRect.h" | 47 #include "platform/geometry/IntRect.h" |
| 47 #include "platform/geometry/IntSize.h" | 48 #include "platform/geometry/IntSize.h" |
| 48 #include "wtf/CurrentTime.h" | 49 #include "wtf/CurrentTime.h" |
| 49 | 50 |
| 50 namespace { | 51 namespace { |
| 51 | 52 |
| 52 class SyntheticInspectorTouchPoint : public WebCore::PlatformTouchPoint { | 53 class SyntheticInspectorTouchPoint : public WebCore::PlatformTouchPoint { |
| 53 public: | 54 public: |
| 54 SyntheticInspectorTouchPoint(unsigned id, State state, const WebCore::IntPoi
nt& screenPos, const WebCore::IntPoint& pos, int radiusX, int radiusY, double ro
tationAngle, double force) | 55 SyntheticInspectorTouchPoint(unsigned id, State state, const WebCore::IntPoi
nt& screenPos, const WebCore::IntPoint& pos, int radiusX, int radiusY, double ro
tationAngle, double force) |
| 55 { | 56 { |
| 56 m_id = id; | 57 m_id = id; |
| 57 m_screenPos = screenPos; | 58 m_screenPos = screenPos; |
| 58 m_pos = pos; | 59 m_pos = pos; |
| 59 m_state = state; | 60 m_state = state; |
| 60 m_radiusY = radiusY; | 61 m_radius = WebCore::FloatSize(radiusX, radiusY); |
| 61 m_radiusX = radiusX; | |
| 62 m_rotationAngle = rotationAngle; | 62 m_rotationAngle = rotationAngle; |
| 63 m_force = force; | 63 m_force = force; |
| 64 } | 64 } |
| 65 }; | 65 }; |
| 66 | 66 |
| 67 class SyntheticInspectorTouchEvent : public WebCore::PlatformTouchEvent { | 67 class SyntheticInspectorTouchEvent : public WebCore::PlatformTouchEvent { |
| 68 public: | 68 public: |
| 69 SyntheticInspectorTouchEvent(const WebCore::PlatformEvent::Type type, unsign
ed modifiers, double timestamp) | 69 SyntheticInspectorTouchEvent(const WebCore::PlatformEvent::Type type, unsign
ed modifiers, double timestamp) |
| 70 { | 70 { |
| 71 m_type = type; | 71 m_type = type; |
| (...skipping 193 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 265 | 265 |
| 266 SyntheticInspectorTouchPoint point(id++, convertedState, globalPoint, co
nvertedPoint, radiusX, radiusY, rotationAngle, force); | 266 SyntheticInspectorTouchPoint point(id++, convertedState, globalPoint, co
nvertedPoint, radiusX, radiusY, rotationAngle, force); |
| 267 event.append(point); | 267 event.append(point); |
| 268 } | 268 } |
| 269 | 269 |
| 270 m_page->mainFrame()->eventHandler().handleTouchEvent(event); | 270 m_page->mainFrame()->eventHandler().handleTouchEvent(event); |
| 271 } | 271 } |
| 272 | 272 |
| 273 } // namespace WebCore | 273 } // namespace WebCore |
| 274 | 274 |
| OLD | NEW |