| 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 d7a98545d3a435c884854f069798f9b72bcc1b4d..9b7227b15bca848f0e8477950cb7025dd81fc650 100644
|
| --- a/ui/events/ozone/layout/xkb/xkb_keyboard_layout_engine.h
|
| +++ b/ui/events/ozone/layout/xkb/xkb_keyboard_layout_engine.h
|
| @@ -5,9 +5,11 @@
|
| #ifndef UI_EVENTS_OZONE_LAYOUT_XKB_XKB_KEYBOARD_LAYOUT_ENGINE_H_
|
| #define UI_EVENTS_OZONE_LAYOUT_XKB_XKB_KEYBOARD_LAYOUT_ENGINE_H_
|
|
|
| +#include <map>
|
| #include <xkbcommon/xkbcommon.h>
|
|
|
| #include "base/containers/hash_tables.h"
|
| +#include "base/memory/ref_counted.h"
|
| #include "base/memory/scoped_ptr.h"
|
| #include "base/strings/string16.h"
|
| #include "ui/events/ozone/layout/events_ozone_layout_export.h"
|
| @@ -86,6 +88,24 @@ class EVENTS_OZONE_LAYOUT_EXPORT XkbKeyboardLayoutEngine
|
| // so we need to trigger its cleanup.
|
| scoped_ptr<xkb_context, XkbContextDeleter> xkb_context_;
|
| scoped_ptr<xkb_state, XkbStateDeleter> xkb_state_;
|
| + std::map<std::string, xkb_keymap*> xkb_keymaps_;
|
| +
|
| + // The class is used to load keymap files.
|
| + class XkbKeymapLoader : public base::RefCountedThreadSafe<XkbKeymapLoader> {
|
| + public:
|
| + explicit XkbKeymapLoader(XkbKeyboardLayoutEngine* layout_engine);
|
| + void loadKeymap(const std::string& layout_name);
|
| +
|
| + private:
|
| + friend class base::RefCountedThreadSafe<XkbKeymapLoader>;
|
| + ~XkbKeymapLoader() {}
|
| + XkbKeyboardLayoutEngine* layout_engine_;
|
| + struct xkb_rule_names* names;
|
| + // Uses xkb_keymap_new_from_names from libxkbcommon to load keymap file,
|
| + // And pushes this keymap file load into FILE thread.
|
| + void startLoadKeymap(const std::string& layout_name,
|
| + xkb_rule_names* names);
|
| + };
|
| };
|
|
|
| } // namespace ui
|
|
|