| 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
|
| index cc1700567a90858a51500238c9a341549b9b82cd..3ee80f33d3b7ff67d3be146b3094c052446059fa 100644
|
| --- a/third_party/WebKit/Source/core/input/KeyboardEventManager.h
|
| +++ b/third_party/WebKit/Source/core/input/KeyboardEventManager.h
|
| @@ -10,6 +10,7 @@
|
| #include "platform/heap/Handle.h"
|
| #include "platform/heap/Visitor.h"
|
| #include "public/platform/WebFocusType.h"
|
| +#include "public/platform/WebInputEvent.h"
|
| #include "public/platform/WebInputEventResult.h"
|
| #include "wtf/Allocator.h"
|
|
|
| @@ -17,24 +18,42 @@ namespace blink {
|
|
|
| class KeyboardEvent;
|
| class LocalFrame;
|
| -class PlatformKeyboardEvent;
|
| class ScrollManager;
|
|
|
| +enum class OverrideCapsLockState {
|
| + Default,
|
| + On,
|
| + Off
|
| +};
|
| +
|
| class CORE_EXPORT KeyboardEventManager {
|
| WTF_MAKE_NONCOPYABLE(KeyboardEventManager);
|
| DISALLOW_NEW();
|
| public:
|
| + static const int kAccessKeyModifiers =
|
| +// TODO(crbug.com/618397): Add a settings to control this behavior.
|
| +#if OS(MACOSX)
|
| + WebInputEvent::ControlKey | WebInputEvent::AltKey;
|
| +#else
|
| + WebInputEvent::AltKey;
|
| +#endif
|
| +
|
| KeyboardEventManager(LocalFrame*, ScrollManager*);
|
| ~KeyboardEventManager();
|
| DECLARE_TRACE();
|
|
|
| - bool handleAccessKey(const PlatformKeyboardEvent&);
|
| - WebInputEventResult keyEvent(const PlatformKeyboardEvent&);
|
| + bool handleAccessKey(const WebKeyboardEvent&);
|
| + WebInputEventResult keyEvent(const WebKeyboardEvent&);
|
| void defaultKeyboardEventHandler(KeyboardEvent*, Node*);
|
|
|
| void capsLockStateMayHaveChanged();
|
| + static WebInputEvent::Modifiers getCurrentModifierState();
|
| + static bool currentCapsLockState();
|
|
|
| private:
|
| + friend class Internals;
|
| + // Allows overriding the current caps lock state for testing purposes.
|
| + static void setCurrentCapsLockState(OverrideCapsLockState);
|
|
|
| void defaultSpaceEventHandler(KeyboardEvent*, Node*);
|
| void defaultBackspaceEventHandler(KeyboardEvent*);
|
|
|