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

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

Issue 636833002: Replace FINAL and OVERRIDE with their C++11 counterparts in Source/core/events (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 6 years, 2 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
« no previous file with comments | « Source/core/events/HashChangeEvent.h ('k') | Source/core/events/MessageEvent.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 27 matching lines...) Expand all
38 38
39 String keyIdentifier; 39 String keyIdentifier;
40 unsigned location; 40 unsigned location;
41 bool ctrlKey; 41 bool ctrlKey;
42 bool altKey; 42 bool altKey;
43 bool shiftKey; 43 bool shiftKey;
44 bool metaKey; 44 bool metaKey;
45 bool repeat; 45 bool repeat;
46 }; 46 };
47 47
48 class KeyboardEvent FINAL : public UIEventWithKeyState { 48 class KeyboardEvent final : public UIEventWithKeyState {
49 DEFINE_WRAPPERTYPEINFO(); 49 DEFINE_WRAPPERTYPEINFO();
50 public: 50 public:
51 enum KeyLocationCode { 51 enum KeyLocationCode {
52 DOM_KEY_LOCATION_STANDARD = 0x00, 52 DOM_KEY_LOCATION_STANDARD = 0x00,
53 DOM_KEY_LOCATION_LEFT = 0x01, 53 DOM_KEY_LOCATION_LEFT = 0x01,
54 DOM_KEY_LOCATION_RIGHT = 0x02, 54 DOM_KEY_LOCATION_RIGHT = 0x02,
55 DOM_KEY_LOCATION_NUMPAD = 0x03 55 DOM_KEY_LOCATION_NUMPAD = 0x03
56 }; 56 };
57 57
58 static PassRefPtrWillBeRawPtr<KeyboardEvent> create() 58 static PassRefPtrWillBeRawPtr<KeyboardEvent> create()
(...skipping 25 matching lines...) Expand all
84 const String& keyIdentifier, unsigned location, 84 const String& keyIdentifier, unsigned location,
85 bool ctrlKey, bool altKey, bool shiftKey, bool metaKey); 85 bool ctrlKey, bool altKey, bool shiftKey, bool metaKey);
86 86
87 const String& keyIdentifier() const { return m_keyIdentifier; } 87 const String& keyIdentifier() const { return m_keyIdentifier; }
88 unsigned location() const { return m_location; } 88 unsigned location() const { return m_location; }
89 89
90 bool getModifierState(const String& keyIdentifier) const; 90 bool getModifierState(const String& keyIdentifier) const;
91 91
92 const PlatformKeyboardEvent* keyEvent() const { return m_keyEvent.get(); } 92 const PlatformKeyboardEvent* keyEvent() const { return m_keyEvent.get(); }
93 93
94 virtual int keyCode() const OVERRIDE; // key code for keydown and keyup, cha racter for keypress 94 virtual int keyCode() const override; // key code for keydown and keyup, cha racter for keypress
95 virtual int charCode() const OVERRIDE; // character code for keypress, 0 for keydown and keyup 95 virtual int charCode() const override; // character code for keypress, 0 for keydown and keyup
96 bool repeat() const { return m_isAutoRepeat; } 96 bool repeat() const { return m_isAutoRepeat; }
97 97
98 virtual const AtomicString& interfaceName() const OVERRIDE; 98 virtual const AtomicString& interfaceName() const override;
99 virtual bool isKeyboardEvent() const OVERRIDE; 99 virtual bool isKeyboardEvent() const override;
100 virtual int which() const OVERRIDE; 100 virtual int which() const override;
101 101
102 virtual void trace(Visitor*) OVERRIDE; 102 virtual void trace(Visitor*) override;
103 103
104 private: 104 private:
105 KeyboardEvent(); 105 KeyboardEvent();
106 KeyboardEvent(const PlatformKeyboardEvent&, AbstractView*); 106 KeyboardEvent(const PlatformKeyboardEvent&, AbstractView*);
107 KeyboardEvent(const AtomicString&, const KeyboardEventInit&); 107 KeyboardEvent(const AtomicString&, const KeyboardEventInit&);
108 KeyboardEvent(const AtomicString& type, bool canBubble, bool cancelable, Abs tractView*, 108 KeyboardEvent(const AtomicString& type, bool canBubble, bool cancelable, Abs tractView*,
109 const String& keyIdentifier, unsigned location, 109 const String& keyIdentifier, unsigned location,
110 bool ctrlKey, bool altKey, bool shiftKey, bool metaKey); 110 bool ctrlKey, bool altKey, bool shiftKey, bool metaKey);
111 111
112 OwnPtr<PlatformKeyboardEvent> m_keyEvent; 112 OwnPtr<PlatformKeyboardEvent> m_keyEvent;
113 String m_keyIdentifier; 113 String m_keyIdentifier;
114 unsigned m_location; 114 unsigned m_location;
115 bool m_isAutoRepeat : 1; 115 bool m_isAutoRepeat : 1;
116 }; 116 };
117 117
118 class KeyboardEventDispatchMediator : public EventDispatchMediator { 118 class KeyboardEventDispatchMediator : public EventDispatchMediator {
119 public: 119 public:
120 static PassRefPtrWillBeRawPtr<KeyboardEventDispatchMediator> create(PassRefP trWillBeRawPtr<KeyboardEvent>); 120 static PassRefPtrWillBeRawPtr<KeyboardEventDispatchMediator> create(PassRefP trWillBeRawPtr<KeyboardEvent>);
121 private: 121 private:
122 explicit KeyboardEventDispatchMediator(PassRefPtrWillBeRawPtr<KeyboardEvent> ); 122 explicit KeyboardEventDispatchMediator(PassRefPtrWillBeRawPtr<KeyboardEvent> );
123 virtual bool dispatchEvent(EventDispatcher*) const OVERRIDE; 123 virtual bool dispatchEvent(EventDispatcher*) const override;
124 }; 124 };
125 125
126 DEFINE_EVENT_TYPE_CASTS(KeyboardEvent); 126 DEFINE_EVENT_TYPE_CASTS(KeyboardEvent);
127 127
128 } // namespace blink 128 } // namespace blink
129 129
130 #endif // KeyboardEvent_h 130 #endif // KeyboardEvent_h
OLDNEW
« no previous file with comments | « Source/core/events/HashChangeEvent.h ('k') | Source/core/events/MessageEvent.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698