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

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

Issue 1182313006: Populates sourceDevice attribute into KeyboardEvent (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: 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 (C) 2001 Peter Kelly (pmk@post.com) 2 * Copyright (C) 2001 Peter Kelly (pmk@post.com)
3 * Copyright (C) 2001 Tobias Anton (anton@stud.fbi.fh-darmstadt.de) 3 * Copyright (C) 2001 Tobias Anton (anton@stud.fbi.fh-darmstadt.de)
4 * Copyright (C) 2006 Samuel Weinig (sam.weinig@gmail.com) 4 * Copyright (C) 2006 Samuel Weinig (sam.weinig@gmail.com)
5 * Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008 Apple Inc. All rights reserv ed. 5 * Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008 Apple Inc. All rights reserv ed.
6 * 6 *
7 * This library is free software; you can redistribute it and/or 7 * This library is free software; you can redistribute it and/or
8 * modify it under the terms of the GNU Library General Public 8 * modify it under the terms of the GNU Library General Public
9 * License as published by the Free Software Foundation; either 9 * License as published by the Free Software Foundation; either
10 * version 2 of the License, or (at your option) any later version. 10 * version 2 of the License, or (at your option) any later version.
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after
61 bool ctrlKey, bool altKey, bool shiftKey, bool metaKey) 61 bool ctrlKey, bool altKey, bool shiftKey, bool metaKey)
62 { 62 {
63 return adoptRefWillBeNoop(new KeyboardEvent(type, canBubble, cancelable, view, keyIdentifier, code, key, location, 63 return adoptRefWillBeNoop(new KeyboardEvent(type, canBubble, cancelable, view, keyIdentifier, code, key, location,
64 ctrlKey, altKey, shiftKey, metaKey)); 64 ctrlKey, altKey, shiftKey, metaKey));
65 } 65 }
66 66
67 virtual ~KeyboardEvent(); 67 virtual ~KeyboardEvent();
68 68
69 void initKeyboardEvent(ScriptState*, const AtomicString& type, bool canBubbl e, bool cancelable, AbstractView*, 69 void initKeyboardEvent(ScriptState*, const AtomicString& type, bool canBubbl e, bool cancelable, AbstractView*,
70 const String& keyIdentifier, unsigned location, 70 const String& keyIdentifier, unsigned location,
71 bool ctrlKey, bool altKey, bool shiftKey, bool metaKey); 71 bool ctrlKey, bool altKey, bool shiftKey, bool metaKey, InputDevice* sou rceDevice = nullptr);
72 72
73 const String& keyIdentifier() const { return m_keyIdentifier; } 73 const String& keyIdentifier() const { return m_keyIdentifier; }
74 const String& code() const { return m_code; } 74 const String& code() const { return m_code; }
75 const String& key() const { return m_key; } 75 const String& key() const { return m_key; }
76 76
77 unsigned location() const { return m_location; } 77 unsigned location() const { return m_location; }
78 78
79 bool getModifierState(const String& keyIdentifier) const; 79 bool getModifierState(const String& keyIdentifier) const;
80 80
81 const PlatformKeyboardEvent* keyEvent() const { return m_keyEvent.get(); } 81 const PlatformKeyboardEvent* keyEvent() const { return m_keyEvent.get(); }
(...skipping 30 matching lines...) Expand all
112 private: 112 private:
113 explicit KeyboardEventDispatchMediator(PassRefPtrWillBeRawPtr<KeyboardEvent> ); 113 explicit KeyboardEventDispatchMediator(PassRefPtrWillBeRawPtr<KeyboardEvent> );
114 virtual bool dispatchEvent(EventDispatcher&) const override; 114 virtual bool dispatchEvent(EventDispatcher&) const override;
115 }; 115 };
116 116
117 DEFINE_EVENT_TYPE_CASTS(KeyboardEvent); 117 DEFINE_EVENT_TYPE_CASTS(KeyboardEvent);
118 118
119 } // namespace blink 119 } // namespace blink
120 120
121 #endif // KeyboardEvent_h 121 #endif // KeyboardEvent_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698