| OLD | NEW |
| 1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #ifndef KeyboardEventManager_h | 5 #ifndef KeyboardEventManager_h |
| 6 #define KeyboardEventManager_h | 6 #define KeyboardEventManager_h |
| 7 | 7 |
| 8 #include "core/CoreExport.h" | 8 #include "core/CoreExport.h" |
| 9 #include "platform/PlatformEvent.h" | 9 #include "platform/PlatformEvent.h" |
| 10 #include "platform/heap/Handle.h" | 10 #include "platform/heap/Handle.h" |
| 11 #include "platform/heap/Visitor.h" | 11 #include "platform/heap/Visitor.h" |
| 12 #include "public/platform/WebFocusType.h" | 12 #include "public/platform/WebFocusType.h" |
| 13 #include "public/platform/WebInputEventResult.h" | 13 #include "public/platform/WebInputEventResult.h" |
| 14 #include "wtf/Allocator.h" | 14 #include "wtf/Allocator.h" |
| 15 | 15 |
| 16 namespace blink { | 16 namespace blink { |
| 17 | 17 |
| 18 class KeyboardEvent; | 18 class KeyboardEvent; |
| 19 class LocalFrame; | 19 class LocalFrame; |
| 20 class PlatformKeyboardEvent; | 20 class PlatformKeyboardEvent; |
| 21 class ScrollManager; | 21 class ScrollManager; |
| 22 | 22 |
| 23 class CORE_EXPORT KeyboardEventManager { | 23 class CORE_EXPORT KeyboardEventManager { |
| 24 WTF_MAKE_NONCOPYABLE(KeyboardEventManager); | 24 WTF_MAKE_NONCOPYABLE(KeyboardEventManager); |
| 25 DISALLOW_NEW(); | 25 DISALLOW_NEW(); |
| 26 public: | 26 public: |
| 27 explicit KeyboardEventManager(LocalFrame*, ScrollManager*); | 27 KeyboardEventManager(LocalFrame*, ScrollManager*); |
| 28 ~KeyboardEventManager(); | 28 ~KeyboardEventManager(); |
| 29 DECLARE_TRACE(); | 29 DECLARE_TRACE(); |
| 30 | 30 |
| 31 bool handleAccessKey(const PlatformKeyboardEvent&); | 31 bool handleAccessKey(const PlatformKeyboardEvent&); |
| 32 WebInputEventResult keyEvent(const PlatformKeyboardEvent&); | 32 WebInputEventResult keyEvent(const PlatformKeyboardEvent&); |
| 33 void defaultKeyboardEventHandler(KeyboardEvent*, Node*); | 33 void defaultKeyboardEventHandler(KeyboardEvent*, Node*); |
| 34 | 34 |
| 35 void capsLockStateMayHaveChanged(); | 35 void capsLockStateMayHaveChanged(); |
| 36 | 36 |
| 37 private: | 37 private: |
| 38 | 38 |
| 39 void defaultSpaceEventHandler(KeyboardEvent*, Node*); | 39 void defaultSpaceEventHandler(KeyboardEvent*, Node*); |
| 40 void defaultBackspaceEventHandler(KeyboardEvent*); | 40 void defaultBackspaceEventHandler(KeyboardEvent*); |
| 41 void defaultTabEventHandler(KeyboardEvent*); | 41 void defaultTabEventHandler(KeyboardEvent*); |
| 42 void defaultEscapeEventHandler(KeyboardEvent*); | 42 void defaultEscapeEventHandler(KeyboardEvent*); |
| 43 void defaultArrowEventHandler(WebFocusType, KeyboardEvent*); | 43 void defaultArrowEventHandler(WebFocusType, KeyboardEvent*); |
| 44 | 44 |
| 45 const Member<LocalFrame> m_frame; | 45 const Member<LocalFrame> m_frame; |
| 46 | 46 |
| 47 ScrollManager* m_scrollManager; | 47 ScrollManager* m_scrollManager; |
| 48 }; | 48 }; |
| 49 | 49 |
| 50 } // namespace blink | 50 } // namespace blink |
| 51 | 51 |
| 52 #endif // KeyboardEventManager_h | 52 #endif // KeyboardEventManager_h |
| OLD | NEW |