Chromium Code Reviews| Index: third_party/WebKit/Source/core/input/KeyboardEventManager.h |
| diff --git a/third_party/WebKit/Source/core/input/KeyboardEventManager.h b/third_party/WebKit/Source/core/input/KeyboardEventManager.h |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..a5f908d713d30a31a86413aff2636569a80146e7 |
| --- /dev/null |
| +++ b/third_party/WebKit/Source/core/input/KeyboardEventManager.h |
| @@ -0,0 +1,57 @@ |
| +// Copyright 2016 The Chromium Authors. All rights reserved. |
| +// Use of this source code is governed by a BSD-style license that can be |
| +// found in the LICENSE file. |
| + |
| +#ifndef KeyboardEventManager_h |
| +#define KeyboardEventManager_h |
| + |
| +#include "core/CoreExport.h" |
| +#include "platform/PlatformEvent.h" |
| +#include "platform/heap/Handle.h" |
| +#include "platform/heap/Visitor.h" |
| +#include "public/platform/WebFocusType.h" |
| +#include "public/platform/WebInputEventResult.h" |
| +#include "wtf/Allocator.h" |
| + |
| +namespace blink { |
| + |
| +class KeyboardEvent; |
| +class LocalFrame; |
| +class PlatformKeyboardEvent; |
| +class ScrollManager; |
| + |
| +class CORE_EXPORT KeyboardEventManager { |
| + WTF_MAKE_NONCOPYABLE(KeyboardEventManager); |
| + DISALLOW_NEW(); |
| +public: |
| + explicit KeyboardEventManager(LocalFrame*, ScrollManager*); |
| + ~KeyboardEventManager(); |
| + DECLARE_TRACE(); |
| + |
| + static PlatformEvent::Modifiers accessKeyModifiers(); |
| + |
| + bool handleAccessKey(const PlatformKeyboardEvent&); |
| + WebInputEventResult keyEvent(const PlatformKeyboardEvent&); |
| + void defaultKeyboardEventHandler(KeyboardEvent*, Node*); |
| + |
| + void capsLockStateMayHaveChanged(); |
| + |
| +private: |
| + |
| + void defaultSpaceEventHandler(KeyboardEvent*, Node*); |
| + void defaultBackspaceEventHandler(KeyboardEvent*); |
| + void defaultTabEventHandler(KeyboardEvent*); |
| + void defaultEscapeEventHandler(KeyboardEvent*); |
| + void defaultArrowEventHandler(WebFocusType, KeyboardEvent*); |
| + |
| + // NOTE: If adding a new field to this class please ensure that it is |
| + // cleared in |PointerEventManager::clear()|. |
|
bokan
2016/06/07 13:06:52
You mean adding KeyboardManager::clear() and calli
Navid Zolghadr
2016/06/07 14:21:07
Yeah. Makes sense. Particularly since there is no
|
| + |
| + const Member<LocalFrame> m_frame; |
| + |
| + ScrollManager* m_scrollManager; |
| +}; |
| + |
| +} // namespace blink |
| + |
| +#endif // KeyboardEventManager_h |