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

Side by Side Diff: ui/events/ozone/layout/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
« no previous file with comments | « no previous file | ui/events/ozone/layout/keyboard_layout_engine_unittest.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_OZONE_PUBLIC_KEYBOARD_LAYOUT_ENGINE_H_ 5 #ifndef UI_OZONE_PUBLIC_KEYBOARD_LAYOUT_ENGINE_H_
6 #define UI_OZONE_PUBLIC_KEYBOARD_LAYOUT_ENGINE_H_ 6 #define UI_OZONE_PUBLIC_KEYBOARD_LAYOUT_ENGINE_H_
7 7
8 #include <string> 8 #include <string>
9 9
10 #include "base/strings/string16.h" 10 #include "base/strings/string16.h"
(...skipping 19 matching lines...) Expand all
30 virtual ~KeyboardLayoutEngine() {} 30 virtual ~KeyboardLayoutEngine() {}
31 31
32 // Returns true if it is possible to change the current layout. 32 // Returns true if it is possible to change the current layout.
33 virtual bool CanSetCurrentLayout() const = 0; 33 virtual bool CanSetCurrentLayout() const = 0;
34 34
35 // Sets the current layout; returns true on success. 35 // Sets the current layout; returns true on success.
36 // Drop-in replacement for ImeKeyboard::SetCurrentKeyboardLayoutByName(); 36 // Drop-in replacement for ImeKeyboard::SetCurrentKeyboardLayoutByName();
37 // the argument string is defined by that interface (crbug.com/362698). 37 // the argument string is defined by that interface (crbug.com/362698).
38 virtual bool SetCurrentLayoutByName(const std::string& layout_name) = 0; 38 virtual bool SetCurrentLayoutByName(const std::string& layout_name) = 0;
39 39
40 // Sets the current layout given a memory location and the buffer size in
41 // bytes, that represent keyboard mapping description; returns true on
42 // success.
43 virtual bool SetCurrentLayoutFromBuffer(const char* keymap_string,
44 size_t size) = 0;
45
40 // Returns true if the current layout makes use of the ISO Level 5 Shift key. 46 // Returns true if the current layout makes use of the ISO Level 5 Shift key.
41 // Drop-in replacement for ImeKeyboard::IsISOLevel5ShiftAvailable(). 47 // Drop-in replacement for ImeKeyboard::IsISOLevel5ShiftAvailable().
42 virtual bool UsesISOLevel5Shift() const = 0; 48 virtual bool UsesISOLevel5Shift() const = 0;
43 49
44 // Returns true if the current layout makes use of the AltGr 50 // Returns true if the current layout makes use of the AltGr
45 // (ISO Level 3 Shift) key. 51 // (ISO Level 3 Shift) key.
46 // Drop-in replacement for ImeKeyboard::IsAltGrAvailable(). 52 // Drop-in replacement for ImeKeyboard::IsAltGrAvailable().
47 virtual bool UsesAltGr() const = 0; 53 virtual bool UsesAltGr() const = 0;
48 54
49 // Provides the meaning of a physical key. 55 // Provides the meaning of a physical key.
(...skipping 13 matching lines...) Expand all
63 // parameters. 69 // parameters.
64 virtual bool Lookup(DomCode dom_code, 70 virtual bool Lookup(DomCode dom_code,
65 int event_flags, 71 int event_flags,
66 DomKey* dom_key, 72 DomKey* dom_key,
67 KeyboardCode* key_code) const = 0; 73 KeyboardCode* key_code) const = 0;
68 }; 74 };
69 75
70 } // namespace ui 76 } // namespace ui
71 77
72 #endif // UI_OZONE_PUBLIC_KEYBOARD_LAYOUT_ENGINE_H_ 78 #endif // UI_OZONE_PUBLIC_KEYBOARD_LAYOUT_ENGINE_H_
OLDNEW
« no previous file with comments | « no previous file | ui/events/ozone/layout/keyboard_layout_engine_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698