Add ICU message format support
[chromium-blink-merge.git] / ui / views / controls / webview / unhandled_keyboard_event_handler.h
blobe444b692d34b9fc2f7eee7cc1ee7e63ef7754545
1 // Copyright (c) 2012 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.
5 #ifndef UI_VIEWS_CONTROLS_WEBVIEW_UNHANDLED_KEYBOARD_EVENT_HANDLER_H_
6 #define UI_VIEWS_CONTROLS_WEBVIEW_UNHANDLED_KEYBOARD_EVENT_HANDLER_H_
8 #include "base/basictypes.h"
9 #include "ui/gfx/native_widget_types.h"
10 #include "ui/views/controls/webview/webview_export.h"
12 namespace content {
13 struct NativeWebKeyboardEvent;
16 namespace views {
17 class FocusManager;
19 // This class handles unhandled keyboard messages coming back from the renderer
20 // process.
21 class WEBVIEW_EXPORT UnhandledKeyboardEventHandler {
22 public:
23 UnhandledKeyboardEventHandler();
24 ~UnhandledKeyboardEventHandler();
26 void HandleKeyboardEvent(const content::NativeWebKeyboardEvent& event,
27 FocusManager* focus_manager);
29 private:
30 // Platform specific handling for unhandled keyboard events.
31 static void HandleNativeKeyboardEvent(gfx::NativeEvent event,
32 FocusManager* focus_manager);
34 // Whether to ignore the next Char keyboard event.
35 // If a RawKeyDown event was handled as a shortcut key, then we're done
36 // handling it and should eat any Char event that the translate phase may
37 // have produced from it. (Handling this event may cause undesirable effects,
38 // such as a beep if DefWindowProc() has no default handling for the given
39 // Char.)
40 bool ignore_next_char_event_;
42 DISALLOW_COPY_AND_ASSIGN(UnhandledKeyboardEventHandler);
45 } // namespace views
47 #endif // UI_VIEWS_CONTROLS_WEBVIEW_UNHANDLED_KEYBOARD_EVENT_HANDLER_H_