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

Side by Side Diff: third_party/WebKit/Source/core/input/KeyboardEventManager.h

Issue 2036643003: Creat a KeyboardEventManager class (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Add copyright notice Created 4 years, 6 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
(Empty)
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
3 // found in the LICENSE file.
4
5 #ifndef KeyboardEventManager_h
6 #define KeyboardEventManager_h
7
8 #include "core/CoreExport.h"
9 #include "platform/PlatformEvent.h"
10 #include "platform/heap/Handle.h"
11 #include "platform/heap/Visitor.h"
12 #include "public/platform/WebFocusType.h"
13 #include "public/platform/WebInputEventResult.h"
14 #include "wtf/Allocator.h"
15
16 namespace blink {
17
18 class KeyboardEvent;
19 class LocalFrame;
20 class PlatformKeyboardEvent;
21 class ScrollManager;
22
23 class CORE_EXPORT KeyboardEventManager {
24 WTF_MAKE_NONCOPYABLE(KeyboardEventManager);
25 DISALLOW_NEW();
26 public:
27 explicit KeyboardEventManager(LocalFrame*, ScrollManager*);
28 ~KeyboardEventManager();
29 DECLARE_TRACE();
30
31 static PlatformEvent::Modifiers accessKeyModifiers();
32
33 bool handleAccessKey(const PlatformKeyboardEvent&);
34 WebInputEventResult keyEvent(const PlatformKeyboardEvent&);
35 void defaultKeyboardEventHandler(KeyboardEvent*, Node*);
36
37 void capsLockStateMayHaveChanged();
38
39 private:
40
41 void defaultSpaceEventHandler(KeyboardEvent*, Node*);
42 void defaultBackspaceEventHandler(KeyboardEvent*);
43 void defaultTabEventHandler(KeyboardEvent*);
44 void defaultEscapeEventHandler(KeyboardEvent*);
45 void defaultArrowEventHandler(WebFocusType, KeyboardEvent*);
46
47 // NOTE: If adding a new field to this class please ensure that it is
48 // 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
49
50 const Member<LocalFrame> m_frame;
51
52 ScrollManager* m_scrollManager;
53 };
54
55 } // namespace blink
56
57 #endif // KeyboardEventManager_h
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/input/EventHandler.cpp ('k') | third_party/WebKit/Source/core/input/KeyboardEventManager.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698