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

Side by Side Diff: third_party/WebKit/Source/core/events/KeyboardEvent.cpp

Issue 1852663002: Oilpan: Remove WillBe types (part 9) (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 8 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, 2005, 2006, 2007 Apple Inc. All rights reserved. 5 * Copyright (C) 2003, 2005, 2006, 2007 Apple Inc. All rights reserved.
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 41 matching lines...) Expand 10 before | Expand all | Expand 10 after
52 { 52 {
53 if (key.isKeypad()) 53 if (key.isKeypad())
54 return KeyboardEvent::DOM_KEY_LOCATION_NUMPAD; 54 return KeyboardEvent::DOM_KEY_LOCATION_NUMPAD;
55 if (key.getModifiers() & PlatformEvent::IsLeft) 55 if (key.getModifiers() & PlatformEvent::IsLeft)
56 return KeyboardEvent::DOM_KEY_LOCATION_LEFT; 56 return KeyboardEvent::DOM_KEY_LOCATION_LEFT;
57 if (key.getModifiers() & PlatformEvent::IsRight) 57 if (key.getModifiers() & PlatformEvent::IsRight)
58 return KeyboardEvent::DOM_KEY_LOCATION_RIGHT; 58 return KeyboardEvent::DOM_KEY_LOCATION_RIGHT;
59 return KeyboardEvent::DOM_KEY_LOCATION_STANDARD; 59 return KeyboardEvent::DOM_KEY_LOCATION_STANDARD;
60 } 60 }
61 61
62 PassRefPtrWillBeRawPtr<KeyboardEvent> KeyboardEvent::create(ScriptState* scriptS tate, const AtomicString& type, const KeyboardEventInit& initializer) 62 RawPtr<KeyboardEvent> KeyboardEvent::create(ScriptState* scriptState, const Atom icString& type, const KeyboardEventInit& initializer)
63 { 63 {
64 if (scriptState->world().isIsolatedWorld()) 64 if (scriptState->world().isIsolatedWorld())
65 UIEventWithKeyState::didCreateEventInIsolatedWorld(initializer.ctrlKey() , initializer.altKey(), initializer.shiftKey(), initializer.metaKey()); 65 UIEventWithKeyState::didCreateEventInIsolatedWorld(initializer.ctrlKey() , initializer.altKey(), initializer.shiftKey(), initializer.metaKey());
66 return adoptRefWillBeNoop(new KeyboardEvent(type, initializer)); 66 return new KeyboardEvent(type, initializer);
67 } 67 }
68 68
69 KeyboardEvent::KeyboardEvent() 69 KeyboardEvent::KeyboardEvent()
70 : m_location(DOM_KEY_LOCATION_STANDARD) 70 : m_location(DOM_KEY_LOCATION_STANDARD)
71 { 71 {
72 } 72 }
73 73
74 KeyboardEvent::KeyboardEvent(const PlatformKeyboardEvent& key, AbstractView* vie w) 74 KeyboardEvent::KeyboardEvent(const PlatformKeyboardEvent& key, AbstractView* vie w)
75 : UIEventWithKeyState(eventTypeForKeyboardEventType(key.type()), true, true, view, 0, key.getModifiers(), key.timestamp(), InputDeviceCapabilities::doesntFi reTouchEventsSourceCapabilities()) 75 : UIEventWithKeyState(eventTypeForKeyboardEventType(key.type()), true, true, view, 0, key.getModifiers(), key.timestamp(), InputDeviceCapabilities::doesntFi reTouchEventsSourceCapabilities())
76 , m_keyEvent(adoptPtr(new PlatformKeyboardEvent(key))) 76 , m_keyEvent(adoptPtr(new PlatformKeyboardEvent(key)))
(...skipping 114 matching lines...) Expand 10 before | Expand all | Expand 10 after
191 break; 191 break;
192 } 192 }
193 } 193 }
194 194
195 DEFINE_TRACE(KeyboardEvent) 195 DEFINE_TRACE(KeyboardEvent)
196 { 196 {
197 UIEventWithKeyState::trace(visitor); 197 UIEventWithKeyState::trace(visitor);
198 } 198 }
199 199
200 } // namespace blink 200 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/events/KeyboardEvent.h ('k') | third_party/WebKit/Source/core/events/MessageEvent.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698