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

Unified 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: 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 side-by-side diff with in-line comments
Download patch
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..f83d1fb73a7b8fd9204bb696b402c0b252a1ae52
--- /dev/null
+++ b/third_party/WebKit/Source/core/input/KeyboardEventManager.h
@@ -0,0 +1,52 @@
+// 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();
+
+ 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*);
+
+ const Member<LocalFrame> m_frame;
+
+ ScrollManager* m_scrollManager;
+};
+
+} // namespace blink
+
+#endif // KeyboardEventManager_h
« 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