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

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

Issue 185393006: Revert "Add [WillBeGarbageCollected] to Event.idl" (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 9 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 | Annotate | Revision Log
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 36 matching lines...) Expand 10 before | Expand all | Expand 10 after
47 47
48 class KeyboardEvent FINAL : public UIEventWithKeyState { 48 class KeyboardEvent FINAL : public UIEventWithKeyState {
49 public: 49 public:
50 enum KeyLocationCode { 50 enum KeyLocationCode {
51 DOM_KEY_LOCATION_STANDARD = 0x00, 51 DOM_KEY_LOCATION_STANDARD = 0x00,
52 DOM_KEY_LOCATION_LEFT = 0x01, 52 DOM_KEY_LOCATION_LEFT = 0x01,
53 DOM_KEY_LOCATION_RIGHT = 0x02, 53 DOM_KEY_LOCATION_RIGHT = 0x02,
54 DOM_KEY_LOCATION_NUMPAD = 0x03 54 DOM_KEY_LOCATION_NUMPAD = 0x03
55 }; 55 };
56 56
57 static PassRefPtrWillBeRawPtr<KeyboardEvent> create() 57 static PassRefPtr<KeyboardEvent> create()
58 { 58 {
59 return adoptRefWillBeRefCountedGarbageCollected(new KeyboardEvent); 59 return adoptRef(new KeyboardEvent);
60 } 60 }
61 61
62 static PassRefPtrWillBeRawPtr<KeyboardEvent> create(const PlatformKeyboardEv ent& platformEvent, AbstractView* view) 62 static PassRefPtr<KeyboardEvent> create(const PlatformKeyboardEvent& platfor mEvent, AbstractView* view)
63 { 63 {
64 return adoptRefWillBeRefCountedGarbageCollected(new KeyboardEvent(platfo rmEvent, view)); 64 return adoptRef(new KeyboardEvent(platformEvent, view));
65 } 65 }
66 66
67 static PassRefPtrWillBeRawPtr<KeyboardEvent> create(const AtomicString& type , const KeyboardEventInit& initializer) 67 static PassRefPtr<KeyboardEvent> create(const AtomicString& type, const Keyb oardEventInit& initializer)
68 { 68 {
69 return adoptRefWillBeRefCountedGarbageCollected(new KeyboardEvent(type, initializer)); 69 return adoptRef(new KeyboardEvent(type, initializer));
70 } 70 }
71 71
72 static PassRefPtrWillBeRawPtr<KeyboardEvent> create(const AtomicString& type , bool canBubble, bool cancelable, AbstractView* view, 72 static PassRefPtr<KeyboardEvent> create(const AtomicString& type, bool canBu bble, bool cancelable, AbstractView* view,
73 const String& keyIdentifier, unsigned location, 73 const String& keyIdentifier, unsigned location,
74 bool ctrlKey, bool altKey, bool shiftKey, bool metaKey, bool altGraphKey ) 74 bool ctrlKey, bool altKey, bool shiftKey, bool metaKey, bool altGraphKey )
75 { 75 {
76 return adoptRefWillBeRefCountedGarbageCollected(new KeyboardEvent(type, canBubble, cancelable, view, keyIdentifier, location, 76 return adoptRef(new KeyboardEvent(type, canBubble, cancelable, view, key Identifier, location,
77 ctrlKey, altKey, shiftKey, metaKey, altGraphKey)); 77 ctrlKey, altKey, shiftKey, metaKey, altGraphKey));
78 } 78 }
79 79
80 virtual ~KeyboardEvent(); 80 virtual ~KeyboardEvent();
81 81
82 void initKeyboardEvent(const AtomicString& type, bool canBubble, bool cancel able, AbstractView*, 82 void initKeyboardEvent(const AtomicString& type, bool canBubble, bool cancel able, AbstractView*,
83 const String& keyIdentifier, unsigned location, 83 const String& keyIdentifier, unsigned location,
84 bool ctrlKey, bool altKey, bool shiftKey, bool metaKey, bool altGraphKey = false); 84 bool ctrlKey, bool altKey, bool shiftKey, bool metaKey, bool altGraphKey = false);
85 85
86 const String& keyIdentifier() const { return m_keyIdentifier; } 86 const String& keyIdentifier() const { return m_keyIdentifier; }
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after
123 private: 123 private:
124 explicit KeyboardEventDispatchMediator(PassRefPtr<KeyboardEvent>); 124 explicit KeyboardEventDispatchMediator(PassRefPtr<KeyboardEvent>);
125 virtual bool dispatchEvent(EventDispatcher*) const OVERRIDE; 125 virtual bool dispatchEvent(EventDispatcher*) const OVERRIDE;
126 }; 126 };
127 127
128 DEFINE_EVENT_TYPE_CASTS(KeyboardEvent); 128 DEFINE_EVENT_TYPE_CASTS(KeyboardEvent);
129 129
130 } // namespace WebCore 130 } // namespace WebCore
131 131
132 #endif // KeyboardEvent_h 132 #endif // KeyboardEvent_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698