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

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

Issue 2645703005: Add a KeyboardLayoutEngine::SetCurrentLayoutFromBuffer implementation (Closed)
Patch Set: for landing Created 3 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
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 <stdint.h> 8 #include <stdint.h>
9 #include <xkbcommon/xkbcommon.h> 9 #include <xkbcommon/xkbcommon.h>
10 10
(...skipping 12 matching lines...) Expand all
23 #include "ui/events/ozone/layout/xkb/xkb_key_code_converter.h" 23 #include "ui/events/ozone/layout/xkb/xkb_key_code_converter.h"
24 24
25 namespace ui { 25 namespace ui {
26 26
27 class EVENTS_OZONE_LAYOUT_EXPORT XkbKeyboardLayoutEngine 27 class EVENTS_OZONE_LAYOUT_EXPORT XkbKeyboardLayoutEngine
28 : public KeyboardLayoutEngine { 28 : public KeyboardLayoutEngine {
29 public: 29 public:
30 XkbKeyboardLayoutEngine(const XkbKeyCodeConverter& converter); 30 XkbKeyboardLayoutEngine(const XkbKeyCodeConverter& converter);
31 ~XkbKeyboardLayoutEngine() override; 31 ~XkbKeyboardLayoutEngine() override;
32 32
33 void SetKeymapFromStringForTest(const char* keymap_string);
34
35 // KeyboardLayoutEngine: 33 // KeyboardLayoutEngine:
36 bool CanSetCurrentLayout() const override; 34 bool CanSetCurrentLayout() const override;
37 bool SetCurrentLayoutByName(const std::string& layout_name) override; 35 bool SetCurrentLayoutByName(const std::string& layout_name) override;
36 // Required by Ozone/Wayland (at least) for non ChromeOS builds. See
37 // http://xkbcommon.org/doc/current/md_doc_quick-guide.html for further info.
38 bool SetCurrentLayoutFromBuffer(const char* keymap_string,
39 size_t size) override;
38 40
39 bool UsesISOLevel5Shift() const override; 41 bool UsesISOLevel5Shift() const override;
40 bool UsesAltGr() const override; 42 bool UsesAltGr() const override;
41 43
42 bool Lookup(DomCode dom_code, 44 bool Lookup(DomCode dom_code,
43 int flags, 45 int flags,
44 DomKey* dom_key, 46 DomKey* dom_key,
45 KeyboardCode* key_code) const override; 47 KeyboardCode* key_code) const override;
46 48
47 static void ParseLayoutName(const std::string& layout_name, 49 static void ParseLayoutName(const std::string& layout_name,
(...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after
112 114
113 std::string current_layout_name_; 115 std::string current_layout_name_;
114 116
115 // Support weak pointers for attach & detach callbacks. 117 // Support weak pointers for attach & detach callbacks.
116 base::WeakPtrFactory<XkbKeyboardLayoutEngine> weak_ptr_factory_; 118 base::WeakPtrFactory<XkbKeyboardLayoutEngine> weak_ptr_factory_;
117 }; 119 };
118 120
119 } // namespace ui 121 } // namespace ui
120 122
121 #endif // UI_EVENTS_OZONE_LAYOUT_XKB_XKB_KEYBOARD_LAYOUT_ENGINE_H_ 123 #endif // UI_EVENTS_OZONE_LAYOUT_XKB_XKB_KEYBOARD_LAYOUT_ENGINE_H_
OLDNEW
« no previous file with comments | « ui/events/ozone/layout/stub/stub_keyboard_layout_engine.cc ('k') | 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