Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(130)

Side by Side Diff: Source/core/events/TouchEvent.h

Issue 1161783006: Populates sourceDevice attribute into TouchEvent (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Put touchevent in uievent layout test Created 5 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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
32 #include "core/events/MouseRelatedEvent.h" 32 #include "core/events/MouseRelatedEvent.h"
33 #include "core/dom/TouchList.h" 33 #include "core/dom/TouchList.h"
34 34
35 namespace blink { 35 namespace blink {
36 36
37 class CORE_EXPORT TouchEvent final : public UIEventWithKeyState { 37 class CORE_EXPORT TouchEvent final : public UIEventWithKeyState {
38 DEFINE_WRAPPERTYPEINFO(); 38 DEFINE_WRAPPERTYPEINFO();
39 public: 39 public:
40 virtual ~TouchEvent(); 40 virtual ~TouchEvent();
41 41
42 // We only initialize sourceDevice when we create TouchEvent from EventHandl er, null if it is from JavaScript.
42 static PassRefPtrWillBeRawPtr<TouchEvent> create() 43 static PassRefPtrWillBeRawPtr<TouchEvent> create()
43 { 44 {
44 return adoptRefWillBeNoop(new TouchEvent); 45 return adoptRefWillBeNoop(new TouchEvent);
45 } 46 }
46 static PassRefPtrWillBeRawPtr<TouchEvent> create(TouchList* touches, 47 static PassRefPtrWillBeRawPtr<TouchEvent> create(TouchList* touches,
47 TouchList* targetTouches, TouchList* changedTouches, 48 TouchList* targetTouches, TouchList* changedTouches,
48 const AtomicString& type, PassRefPtrWillBeRawPtr<AbstractView> view, 49 const AtomicString& type, PassRefPtrWillBeRawPtr<AbstractView> view,
49 bool ctrlKey, bool altKey, bool shiftKey, bool metaKey, bool cancelable, bool causesScrollingIfUncanceled, 50 bool ctrlKey, bool altKey, bool shiftKey, bool metaKey, bool cancelable, bool causesScrollingIfUncanceled,
50 double uiCreateTime = 0) 51 double uiCreateTime = 0)
51 { 52 {
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after
99 explicit TouchEventDispatchMediator(PassRefPtrWillBeRawPtr<TouchEvent>); 100 explicit TouchEventDispatchMediator(PassRefPtrWillBeRawPtr<TouchEvent>);
100 TouchEvent& event() const; 101 TouchEvent& event() const;
101 virtual bool dispatchEvent(EventDispatcher&) const override; 102 virtual bool dispatchEvent(EventDispatcher&) const override;
102 }; 103 };
103 104
104 DEFINE_EVENT_TYPE_CASTS(TouchEvent); 105 DEFINE_EVENT_TYPE_CASTS(TouchEvent);
105 106
106 } // namespace blink 107 } // namespace blink
107 108
108 #endif // TouchEvent_h 109 #endif // TouchEvent_h
OLDNEW
« no previous file with comments | « LayoutTests/fast/events/uievent-with-inputdevice-expected.txt ('k') | Source/core/events/TouchEvent.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698