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

Side by Side Diff: ui/events/ozone/layout/keyboard_layout_engine.h

Issue 1284433002: Revise ui::DomKey to unify character and non-character codes. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: IsDead Created 5 years, 3 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
« no previous file with comments | « ui/events/ozone/events_ozone.gyp ('k') | ui/events/ozone/layout/layout_util.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef UI_OZONE_PUBLIC_KEYBOARD_LAYOUT_ENGINE_H_ 5 #ifndef UI_OZONE_PUBLIC_KEYBOARD_LAYOUT_ENGINE_H_
6 #define UI_OZONE_PUBLIC_KEYBOARD_LAYOUT_ENGINE_H_ 6 #define UI_OZONE_PUBLIC_KEYBOARD_LAYOUT_ENGINE_H_
7 7
8 #include <string> 8 #include <string>
9 9
10 #include "base/strings/string16.h" 10 #include "base/strings/string16.h"
11 #include "ui/events/keycodes/dom/dom_key.h"
11 #include "ui/events/keycodes/keyboard_codes.h" 12 #include "ui/events/keycodes/keyboard_codes.h"
12 #include "ui/events/ozone/layout/events_ozone_layout_export.h" 13 #include "ui/events/ozone/layout/events_ozone_layout_export.h"
13 14
14 namespace ui { 15 namespace ui {
15 16
16 enum class DomCode; 17 enum class DomCode;
17 enum class DomKey;
18 18
19 // A KeyboardLayoutEngine provides a platform-independent interface to 19 // A KeyboardLayoutEngine provides a platform-independent interface to
20 // key mapping. Key mapping provides a meaning (DomKey and character, 20 // key mapping. Key mapping provides a meaning (DomKey and character,
21 // and optionally Windows key code) for a physical key press (DomCode 21 // and optionally Windows key code) for a physical key press (DomCode
22 // and modifier flags). 22 // and modifier flags).
23 // 23 //
24 // This interface does not expose individual layouts because it must support 24 // This interface does not expose individual layouts because it must support
25 // platforms that only provide for one active system layout, and/or platforms 25 // platforms that only provide for one active system layout, and/or platforms
26 // where layouts have no accessible representation. 26 // where layouts have no accessible representation.
27 class EVENTS_OZONE_LAYOUT_EXPORT KeyboardLayoutEngine { 27 class EVENTS_OZONE_LAYOUT_EXPORT KeyboardLayoutEngine {
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
59 // to 0, and *key_code to VKEY_UNKNOWN. 59 // to 0, and *key_code to VKEY_UNKNOWN.
60 // 60 //
61 // Returns false if it cannot determine the meaning (and cannot determine 61 // Returns false if it cannot determine the meaning (and cannot determine
62 // that there is none); in this case it does not set any of the output 62 // that there is none); in this case it does not set any of the output
63 // parameters. 63 // parameters.
64 // 64 //
65 // TODO(kpschoedel): remove the platform_keycode output. crbug.com/442757 65 // TODO(kpschoedel): remove the platform_keycode output. crbug.com/442757
66 virtual bool Lookup(DomCode dom_code, 66 virtual bool Lookup(DomCode dom_code,
67 int event_flags, 67 int event_flags,
68 DomKey* dom_key, 68 DomKey* dom_key,
69 base::char16* character,
70 KeyboardCode* key_code, 69 KeyboardCode* key_code,
71 uint32* platform_keycode) const = 0; 70 uint32* platform_keycode) const = 0;
72 }; 71 };
73 72
74 } // namespace ui 73 } // namespace ui
75 74
76 #endif // UI_OZONE_PUBLIC_KEYBOARD_LAYOUT_ENGINE_H_ 75 #endif // UI_OZONE_PUBLIC_KEYBOARD_LAYOUT_ENGINE_H_
OLDNEW
« no previous file with comments | « ui/events/ozone/events_ozone.gyp ('k') | ui/events/ozone/layout/layout_util.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698