OLD | NEW |
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 105 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
116 KeyboardEvent* findKeyboardEvent(Event*); | 116 KeyboardEvent* findKeyboardEvent(Event*); |
117 | 117 |
118 class KeyboardEventDispatchMediator : public EventDispatchMediator { | 118 class KeyboardEventDispatchMediator : public EventDispatchMediator { |
119 public: | 119 public: |
120 static PassRefPtr<KeyboardEventDispatchMediator> create(PassRefPtr<KeyboardE
vent>); | 120 static PassRefPtr<KeyboardEventDispatchMediator> create(PassRefPtr<KeyboardE
vent>); |
121 private: | 121 private: |
122 explicit KeyboardEventDispatchMediator(PassRefPtr<KeyboardEvent>); | 122 explicit KeyboardEventDispatchMediator(PassRefPtr<KeyboardEvent>); |
123 virtual bool dispatchEvent(EventDispatcher*) const OVERRIDE; | 123 virtual bool dispatchEvent(EventDispatcher*) const OVERRIDE; |
124 }; | 124 }; |
125 | 125 |
| 126 inline KeyboardEvent* toKeyboardEvent(Event* event) |
| 127 { |
| 128 ASSERT_WITH_SECURITY_IMPLICATION(!event || event->isKeyboardEvent()); |
| 129 return static_cast<KeyboardEvent*>(event); |
| 130 } |
| 131 |
126 } // namespace WebCore | 132 } // namespace WebCore |
127 | 133 |
128 #endif // KeyboardEvent_h | 134 #endif // KeyboardEvent_h |
OLD | NEW |