OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2004, 2005, 2006, 2009 Apple Inc. All rights reserved. | 2 * Copyright (C) 2004, 2005, 2006, 2009 Apple 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 | 5 * modification, are permitted provided that the following conditions |
6 * are met: | 6 * are met: |
7 * 1. Redistributions of source code must retain the above copyright | 7 * 1. Redistributions of source code must retain the above copyright |
8 * notice, this list of conditions and the following disclaimer. | 8 * notice, this list of conditions and the following disclaimer. |
9 * 2. Redistributions in binary form must reproduce the above copyright | 9 * 2. Redistributions in binary form must reproduce the above copyright |
10 * notice, this list of conditions and the following disclaimer in the | 10 * notice, this list of conditions and the following disclaimer in the |
(...skipping 18 matching lines...) Expand all Loading... |
29 #include "platform/PlatformEvent.h" | 29 #include "platform/PlatformEvent.h" |
30 #include "platform/geometry/IntPoint.h" | 30 #include "platform/geometry/IntPoint.h" |
31 #include "public/platform/WebPointerProperties.h" | 31 #include "public/platform/WebPointerProperties.h" |
32 #include "wtf/text/WTFString.h" | 32 #include "wtf/text/WTFString.h" |
33 | 33 |
34 namespace blink { | 34 namespace blink { |
35 | 35 |
36 class PlatformMouseEvent : public PlatformEvent { | 36 class PlatformMouseEvent : public PlatformEvent { |
37 public: | 37 public: |
38 enum SyntheticEventType { | 38 enum SyntheticEventType { |
39 // Real mouse input events or synthetic events that behave just like real ev
ents | 39 // Real mouse input events or synthetic events that behave just like real |
| 40 // events |
40 RealOrIndistinguishable, | 41 RealOrIndistinguishable, |
41 // Synthetic mouse events derived from touch input | 42 // Synthetic mouse events derived from touch input |
42 FromTouch, | 43 FromTouch, |
43 // Synthetic mouse events generated without a position, for example those ge
nerated | 44 // Synthetic mouse events generated without a position, for example those |
44 // from keyboard input. | 45 // generated from keyboard input. |
45 Positionless, | 46 Positionless, |
46 }; | 47 }; |
47 | 48 |
48 PlatformMouseEvent() : PlatformMouseEvent(PlatformEvent::MouseMoved) {} | 49 PlatformMouseEvent() : PlatformMouseEvent(PlatformEvent::MouseMoved) {} |
49 | 50 |
50 explicit PlatformMouseEvent(EventType type) | 51 explicit PlatformMouseEvent(EventType type) |
51 : PlatformEvent(type), | 52 : PlatformEvent(type), |
52 m_clickCount(0), | 53 m_clickCount(0), |
53 m_synthesized(RealOrIndistinguishable) {} | 54 m_synthesized(RealOrIndistinguishable) {} |
54 | 55 |
(...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
117 // For canvas hit region. | 118 // For canvas hit region. |
118 // TODO(zino): This might make more sense to put in HitTestResults or | 119 // TODO(zino): This might make more sense to put in HitTestResults or |
119 // some other part of MouseEventWithHitTestResults, but for now it's | 120 // some other part of MouseEventWithHitTestResults, but for now it's |
120 // most convenient to stash it here. Please see: http://crbug.com/592947. | 121 // most convenient to stash it here. Please see: http://crbug.com/592947. |
121 String m_region; | 122 String m_region; |
122 }; | 123 }; |
123 | 124 |
124 } // namespace blink | 125 } // namespace blink |
125 | 126 |
126 #endif // PlatformMouseEvent_h | 127 #endif // PlatformMouseEvent_h |
OLD | NEW |