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

Side by Side Diff: ui/events/ozone/layout/xkb/xkb_keyboard_layout_engine.h

Issue 848713003: 1. Adds null check when keymap is failed to load. 2. Moves xkb_rule_names construction into worker … (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@2272
Patch Set: 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
« no previous file with comments | « no previous file | ui/events/ozone/layout/xkb/xkb_keyboard_layout_engine.cc » ('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_EVENTS_OZONE_LAYOUT_XKB_XKB_KEYBOARD_LAYOUT_ENGINE_H_ 5 #ifndef UI_EVENTS_OZONE_LAYOUT_XKB_XKB_KEYBOARD_LAYOUT_ENGINE_H_
6 #define UI_EVENTS_OZONE_LAYOUT_XKB_XKB_KEYBOARD_LAYOUT_ENGINE_H_ 6 #define UI_EVENTS_OZONE_LAYOUT_XKB_XKB_KEYBOARD_LAYOUT_ENGINE_H_
7 7
8 #include <xkbcommon/xkbcommon.h> 8 #include <xkbcommon/xkbcommon.h>
9 #include <vector> 9 #include <vector>
10 10
(...skipping 23 matching lines...) Expand all
34 bool UsesISOLevel5Shift() const override; 34 bool UsesISOLevel5Shift() const override;
35 bool UsesAltGr() const override; 35 bool UsesAltGr() const override;
36 36
37 bool Lookup(DomCode dom_code, 37 bool Lookup(DomCode dom_code,
38 int flags, 38 int flags,
39 DomKey* dom_key, 39 DomKey* dom_key,
40 base::char16* character, 40 base::char16* character,
41 KeyboardCode* key_code, 41 KeyboardCode* key_code,
42 uint32* platform_keycode) const override; 42 uint32* platform_keycode) const override;
43 43
44 // Gets the names of the RMLO rule for libxkbcommon.
45 // Makes it protected for testing.
46 scoped_ptr<xkb_rule_names> GetXkbRuleNames(const std::string& layout_name);
47
48 protected: 44 protected:
49 // Table for EventFlagsToXkbFlags(). 45 // Table for EventFlagsToXkbFlags().
50 struct XkbFlagMapEntry { 46 struct XkbFlagMapEntry {
51 int ui_flag; 47 int ui_flag;
52 xkb_mod_mask_t xkb_flag; 48 xkb_mod_mask_t xkb_flag;
53 }; 49 };
54 std::vector<XkbFlagMapEntry> xkb_flag_map_; 50 std::vector<XkbFlagMapEntry> xkb_flag_map_;
55 51
56 // Flag mask for num lock, which is always considered enabled. 52 // Flag mask for num lock, which is always considered enabled.
57 xkb_mod_mask_t num_lock_mod_mask_; 53 xkb_mod_mask_t num_lock_mod_mask_;
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after
108 104
109 std::string current_layout_name_; 105 std::string current_layout_name_;
110 106
111 // Support weak pointers for attach & detach callbacks. 107 // Support weak pointers for attach & detach callbacks.
112 base::WeakPtrFactory<XkbKeyboardLayoutEngine> weak_ptr_factory_; 108 base::WeakPtrFactory<XkbKeyboardLayoutEngine> weak_ptr_factory_;
113 }; 109 };
114 110
115 } // namespace ui 111 } // namespace ui
116 112
117 #endif // UI_EVENTS_OZONE_LAYOUT_XKB_XKB_KEYBOARD_LAYOUT_ENGINE_H_ 113 #endif // UI_EVENTS_OZONE_LAYOUT_XKB_XKB_KEYBOARD_LAYOUT_ENGINE_H_
OLDNEW
« no previous file with comments | « no previous file | ui/events/ozone/layout/xkb/xkb_keyboard_layout_engine.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698