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

Side by Side Diff: ui/views/controls/webview/unhandled_keyboard_event_handler.h

Issue 851853002: It is time. (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: Trying to reup because the last upload failed. Created 5 years, 11 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 (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.
4
5 #ifndef UI_VIEWS_CONTROLS_WEBVIEW_UNHANDLED_KEYBOARD_EVENT_HANDLER_H_
6 #define UI_VIEWS_CONTROLS_WEBVIEW_UNHANDLED_KEYBOARD_EVENT_HANDLER_H_
7
8 #include "base/basictypes.h"
9 #include "ui/views/controls/webview/webview_export.h"
10
11 namespace content {
12 struct NativeWebKeyboardEvent;
13 }
14
15 namespace views {
16 class FocusManager;
17
18 // This class handles unhandled keyboard messages coming back from the renderer
19 // process.
20 class WEBVIEW_EXPORT UnhandledKeyboardEventHandler {
21 public:
22 UnhandledKeyboardEventHandler();
23 ~UnhandledKeyboardEventHandler();
24
25 void HandleKeyboardEvent(const content::NativeWebKeyboardEvent& event,
26 FocusManager* focus_manager);
27
28 private:
29 // Whether to ignore the next Char keyboard event.
30 // If a RawKeyDown event was handled as a shortcut key, then we're done
31 // handling it and should eat any Char event that the translate phase may
32 // have produced from it. (Handling this event may cause undesirable effects,
33 // such as a beep if DefWindowProc() has no default handling for the given
34 // Char.)
35 bool ignore_next_char_event_;
36
37 DISALLOW_COPY_AND_ASSIGN(UnhandledKeyboardEventHandler);
38 };
39
40 } // namespace views
41
42 #endif // UI_VIEWS_CONTROLS_WEBVIEW_UNHANDLED_KEYBOARD_EVENT_HANDLER_H_
OLDNEW
« no previous file with comments | « ui/views/controls/webview/DEPS ('k') | ui/views/controls/webview/unhandled_keyboard_event_handler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698