Index: ui/events/ozone/layout/xkb/xkb_keyboard_layout_engine.h |
diff --git a/ui/events/ozone/layout/xkb/xkb_keyboard_layout_engine.h b/ui/events/ozone/layout/xkb/xkb_keyboard_layout_engine.h |
index a338c18da655f44148c2f4ded001145a90fc87f6..4869af535e7b1529657d0d0c6148081b1ff4e89b 100644 |
--- a/ui/events/ozone/layout/xkb/xkb_keyboard_layout_engine.h |
+++ b/ui/events/ozone/layout/xkb/xkb_keyboard_layout_engine.h |
@@ -72,18 +72,23 @@ class EVENTS_OZONE_LAYOUT_EXPORT XkbKeyboardLayoutEngine |
xkb_keysym_t xkb_keysym, |
base::char16 character) const; |
+ // Sets a new XKB keymap. This updates xkb_state_ (which takes ownership |
+ // of the keymap), and updates xkb_flag_map_ for the new keymap. |
+ virtual void SetKeymap(xkb_keymap* keymap); |
+ |
// Maps DomCode to xkb_keycode_t. |
const XkbKeyCodeConverter& key_code_converter_; |
+ // libxkbcommon uses explicit reference counting for its structures, |
+ // so we need to trigger its cleanup. |
+ std::unique_ptr<xkb_state, XkbStateDeleter> xkb_state_; |
+ |
private: |
struct XkbKeymapEntry { |
std::string layout_name; |
xkb_keymap* keymap; |
}; |
std::vector<XkbKeymapEntry> xkb_keymaps_; |
- // Sets a new XKB keymap. This updates xkb_state_ (which takes ownership |
- // of the keymap), and updates xkb_flag_map_ for the new keymap. |
- void SetKeymap(xkb_keymap* keymap); |
// Returns the XKB modifiers flags corresponding to the given EventFlags. |
xkb_mod_mask_t EventFlagsToXkbFlags(int ui_flags) const; |
@@ -107,10 +112,7 @@ class EVENTS_OZONE_LAYOUT_EXPORT XkbKeyboardLayoutEngine |
void OnKeymapLoaded(const std::string& layout_name, |
std::unique_ptr<char, base::FreeDeleter> keymap_str); |
- // libxkbcommon uses explicit reference counting for its structures, |
- // so we need to trigger its cleanup. |
std::unique_ptr<xkb_context, XkbContextDeleter> xkb_context_; |
- std::unique_ptr<xkb_state, XkbStateDeleter> xkb_state_; |
std::string current_layout_name_; |