Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 /* | 1 /* |
| 2 * Copyright 2008, The Android Open Source Project | 2 * Copyright 2008, The Android Open Source Project |
| 3 * Copyright (C) 2012 Research In Motion Limited. All rights reserved. | 3 * Copyright (C) 2012 Research In Motion Limited. All rights reserved. |
| 4 * | 4 * |
| 5 * Redistribution and use in source and binary forms, with or without | 5 * Redistribution and use in source and binary forms, with or without |
| 6 * modification, are permitted provided that the following conditions | 6 * modification, are permitted provided that the following conditions |
| 7 * are met: | 7 * are met: |
| 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 copyright | 10 * * Redistributions in binary form must reproduce the above copyright |
| (...skipping 21 matching lines...) Expand all Loading... | |
| 32 #include "bindings/core/v8/ScriptState.h" | 32 #include "bindings/core/v8/ScriptState.h" |
| 33 #include "core/events/EventDispatcher.h" | 33 #include "core/events/EventDispatcher.h" |
| 34 #include "core/frame/FrameConsole.h" | 34 #include "core/frame/FrameConsole.h" |
| 35 #include "core/frame/LocalDOMWindow.h" | 35 #include "core/frame/LocalDOMWindow.h" |
| 36 #include "core/inspector/ConsoleMessage.h" | 36 #include "core/inspector/ConsoleMessage.h" |
| 37 | 37 |
| 38 namespace blink { | 38 namespace blink { |
| 39 | 39 |
| 40 TouchEvent::TouchEvent() | 40 TouchEvent::TouchEvent() |
| 41 { | 41 { |
| 42 sourceDevice()->setFiresTouchEvents(true); | |
|
tdresser
2015/06/03 17:50:39
Shouldn't this use touchEventInstance?
| |
| 42 } | 43 } |
| 43 | 44 |
| 44 TouchEvent::TouchEvent(TouchList* touches, TouchList* targetTouches, | 45 TouchEvent::TouchEvent(TouchList* touches, TouchList* targetTouches, |
| 45 TouchList* changedTouches, const AtomicString& type, | 46 TouchList* changedTouches, const AtomicString& type, |
| 46 PassRefPtrWillBeRawPtr<AbstractView> view, | 47 PassRefPtrWillBeRawPtr<AbstractView> view, |
| 47 bool ctrlKey, bool altKey, bool shiftKey, bool metaKey, bool cancelable, bool causesScrollingIfUncanceled, | 48 PassRefPtrWillBeRawPtr<InputDevice> sourceDevice, |
| 48 double uiCreateTime) | 49 bool ctrlKey, bool altKey, bool shiftKey, bool metaKey, bool cancelable, boo l causesScrollingIfUncanceled, |
| 49 : UIEventWithKeyState(type, true, cancelable, view, 0, | 50 double uiCreateTime) |
| 50 ctrlKey, altKey, shiftKey, metaKey) | 51 : UIEventWithKeyState(type, true, cancelable, view, 0, sourceDevice, ctrlKey , altKey, shiftKey, metaKey) |
|
tdresser
2015/06/03 17:50:39
Shouldn't this use touchEventInstance?
| |
| 51 , m_touches(touches) | 52 , m_touches(touches) |
| 52 , m_targetTouches(targetTouches) | 53 , m_targetTouches(targetTouches) |
| 53 , m_changedTouches(changedTouches) | 54 , m_changedTouches(changedTouches) |
| 54 , m_causesScrollingIfUncanceled(causesScrollingIfUncanceled) | 55 , m_causesScrollingIfUncanceled(causesScrollingIfUncanceled) |
| 55 { | 56 { |
| 56 setUICreateTime(uiCreateTime); | 57 setUICreateTime(uiCreateTime); |
| 57 } | 58 } |
| 58 | 59 |
| 59 TouchEvent::~TouchEvent() | 60 TouchEvent::~TouchEvent() |
| 60 { | 61 { |
| (...skipping 17 matching lines...) Expand all Loading... | |
| 78 | 79 |
| 79 initUIEvent(type, true, cancelable, view, 0); | 80 initUIEvent(type, true, cancelable, view, 0); |
| 80 | 81 |
| 81 m_touches = touches; | 82 m_touches = touches; |
| 82 m_targetTouches = targetTouches; | 83 m_targetTouches = targetTouches; |
| 83 m_changedTouches = changedTouches; | 84 m_changedTouches = changedTouches; |
| 84 m_ctrlKey = ctrlKey; | 85 m_ctrlKey = ctrlKey; |
| 85 m_altKey = altKey; | 86 m_altKey = altKey; |
| 86 m_shiftKey = shiftKey; | 87 m_shiftKey = shiftKey; |
| 87 m_metaKey = metaKey; | 88 m_metaKey = metaKey; |
| 89 sourceDevice()->setFiresTouchEvents(true); | |
| 88 } | 90 } |
| 89 | 91 |
| 90 const AtomicString& TouchEvent::interfaceName() const | 92 const AtomicString& TouchEvent::interfaceName() const |
| 91 { | 93 { |
| 92 return EventNames::TouchEvent; | 94 return EventNames::TouchEvent; |
| 93 } | 95 } |
| 94 | 96 |
| 95 bool TouchEvent::isTouchEvent() const | 97 bool TouchEvent::isTouchEvent() const |
| 96 { | 98 { |
| 97 return true; | 99 return true; |
| (...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 132 return toTouchEvent(EventDispatchMediator::event()); | 134 return toTouchEvent(EventDispatchMediator::event()); |
| 133 } | 135 } |
| 134 | 136 |
| 135 bool TouchEventDispatchMediator::dispatchEvent(EventDispatcher& dispatcher) cons t | 137 bool TouchEventDispatchMediator::dispatchEvent(EventDispatcher& dispatcher) cons t |
| 136 { | 138 { |
| 137 event().eventPath().adjustForTouchEvent(event()); | 139 event().eventPath().adjustForTouchEvent(event()); |
| 138 return dispatcher.dispatch(); | 140 return dispatcher.dispatch(); |
| 139 } | 141 } |
| 140 | 142 |
| 141 } // namespace blink | 143 } // namespace blink |
| OLD | NEW |