diff options
author | spang <spang@chromium.org> | 2015-01-06 09:39:26 -0800 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2015-01-06 17:40:04 +0000 |
commit | 99f0df5c221b3f489c848cb8a0f5d80099767515 (patch) | |
tree | 81d5d2daed52a78f96f5451c6c2c214e8e1b19d5 /ui/events/ozone/layout/xkb/xkb_keyboard_layout_engine.h | |
parent | 6e54061cc9ae3d7e41164208f9c7e6a237632bac (diff) | |
download | chromium_src-99f0df5c221b3f489c848cb8a0f5d80099767515.zip chromium_src-99f0df5c221b3f489c848cb8a0f5d80099767515.tar.gz chromium_src-99f0df5c221b3f489c848cb8a0f5d80099767515.tar.bz2 |
Revert of ozone: xkb: Load keymaps on worker thread & cache them (patchset #17 id:310001 of https://codereview.chromium.org/817983002/)
Reason for revert:
Adds thread-unsafe code.
Original issue's description:
> ozone: xkb: Load keymaps on worker thread & cache them
>
> 1. Free xkb keymaps in the destructor.
> 2. Moves kemap load into another worker thread.
> 3. Adds keymap caching.
>
> BUG=430194
>
> Committed: https://crrev.com/f0b38f78f146cedf336ac9ad0236f681833c7263
> Cr-Commit-Position: refs/heads/master@{#309928}
TBR=shuchen@chromium.org,kpschoedel@chromium.org,fengyuan@chromium.org
NOTREECHECKS=true
NOTRY=true
BUG=430194
Review URL: https://codereview.chromium.org/823633003
Cr-Commit-Position: refs/heads/master@{#310105}
Diffstat (limited to 'ui/events/ozone/layout/xkb/xkb_keyboard_layout_engine.h')
-rw-r--r-- | ui/events/ozone/layout/xkb/xkb_keyboard_layout_engine.h | 22 |
1 files changed, 0 insertions, 22 deletions
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 8281b68..d7a98545 100644 --- a/ui/events/ozone/layout/xkb/xkb_keyboard_layout_engine.h +++ b/ui/events/ozone/layout/xkb/xkb_keyboard_layout_engine.h @@ -6,14 +6,10 @@ #define UI_EVENTS_OZONE_LAYOUT_XKB_XKB_KEYBOARD_LAYOUT_ENGINE_H_ #include <xkbcommon/xkbcommon.h> -#include <vector> #include "base/containers/hash_tables.h" -#include "base/memory/ref_counted.h" #include "base/memory/scoped_ptr.h" -#include "base/memory/weak_ptr.h" #include "base/strings/string16.h" -#include "base/task_runner.h" #include "ui/events/ozone/layout/events_ozone_layout_export.h" #include "ui/events/ozone/layout/keyboard_layout_engine.h" #include "ui/events/ozone/layout/xkb/scoped_xkb.h" @@ -41,10 +37,6 @@ class EVENTS_OZONE_LAYOUT_EXPORT XkbKeyboardLayoutEngine KeyboardCode* key_code, uint32* platform_keycode) const override; - // Gets the names of the RMLO rule for libxkbcommon. - // Makes it protected for testing. - scoped_ptr<xkb_rule_names> GetXkbRuleNames(const std::string& layout_name); - protected: // Table for EventFlagsToXkbFlags(). struct XkbFlagMapEntry { @@ -68,11 +60,6 @@ class EVENTS_OZONE_LAYOUT_EXPORT XkbKeyboardLayoutEngine const XkbKeyCodeConverter& key_code_converter_; 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); @@ -95,19 +82,10 @@ class EVENTS_OZONE_LAYOUT_EXPORT XkbKeyboardLayoutEngine base::char16 base_character, int ui_flags) const; - // Callback when keymap file is loaded complete. - void OnKeymapLoaded(const std::string& layout_name, - scoped_ptr<xkb_keymap, XkbKeymapDeleter> keymap); - // libxkbcommon uses explicit reference counting for its structures, // so we need to trigger its cleanup. scoped_ptr<xkb_context, XkbContextDeleter> xkb_context_; scoped_ptr<xkb_state, XkbStateDeleter> xkb_state_; - - std::string current_layout_name_; - - // Support weak pointers for attach & detach callbacks. - base::WeakPtrFactory<XkbKeyboardLayoutEngine> weak_ptr_factory_; }; } // namespace ui |