OLD | NEW |
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 #include "ui/events/ozone/layout/stub/stub_keyboard_layout_engine.h" | 5 #include "ui/events/ozone/layout/stub/stub_keyboard_layout_engine.h" |
6 | 6 |
7 #include <algorithm> | |
8 | |
9 #include "base/strings/string16.h" | 7 #include "base/strings/string16.h" |
10 #include "ui/events/keycodes/dom/dom_code.h" | 8 #include "ui/events/keycodes/dom/dom_code.h" |
11 #include "ui/events/keycodes/dom/dom_key.h" | 9 #include "ui/events/keycodes/dom/dom_key.h" |
12 #include "ui/events/keycodes/keyboard_code_conversion.h" | 10 #include "ui/events/keycodes/keyboard_code_conversion.h" |
13 #include "ui/events/ozone/layout/layout_util.h" | 11 #include "ui/events/ozone/layout/layout_util.h" |
14 | 12 |
15 namespace ui { | 13 namespace ui { |
16 | 14 |
17 StubKeyboardLayoutEngine::StubKeyboardLayoutEngine() { | 15 StubKeyboardLayoutEngine::StubKeyboardLayoutEngine() { |
18 } | 16 } |
19 | 17 |
20 StubKeyboardLayoutEngine::~StubKeyboardLayoutEngine() { | 18 StubKeyboardLayoutEngine::~StubKeyboardLayoutEngine() { |
21 } | 19 } |
22 | 20 |
23 bool StubKeyboardLayoutEngine::CanSetCurrentLayout() const { | 21 bool StubKeyboardLayoutEngine::CanSetCurrentLayout() const { |
24 return false; | 22 return false; |
25 } | 23 } |
26 | 24 |
27 bool StubKeyboardLayoutEngine::SetCurrentLayoutByName( | 25 bool StubKeyboardLayoutEngine::SetCurrentLayoutByName( |
28 const std::string& layout_name) { | 26 const std::string& layout_name) { |
29 return false; | 27 return false; |
30 } | 28 } |
31 | 29 |
| 30 bool StubKeyboardLayoutEngine::SetCurrentLayoutFromBuffer( |
| 31 const char* keymap_str, |
| 32 size_t size) { |
| 33 return false; |
| 34 } |
| 35 |
32 bool StubKeyboardLayoutEngine::UsesISOLevel5Shift() const { | 36 bool StubKeyboardLayoutEngine::UsesISOLevel5Shift() const { |
33 return false; | 37 return false; |
34 } | 38 } |
35 | 39 |
36 bool StubKeyboardLayoutEngine::UsesAltGr() const { | 40 bool StubKeyboardLayoutEngine::UsesAltGr() const { |
37 return true; | 41 return true; |
38 } | 42 } |
39 | 43 |
40 bool StubKeyboardLayoutEngine::Lookup(DomCode dom_code, | 44 bool StubKeyboardLayoutEngine::Lookup(DomCode dom_code, |
41 int flags, | 45 int flags, |
42 DomKey* out_dom_key, | 46 DomKey* out_dom_key, |
43 KeyboardCode* out_key_code) const { | 47 KeyboardCode* out_key_code) const { |
44 return DomCodeToUsLayoutDomKey(dom_code, flags, out_dom_key, out_key_code); | 48 return DomCodeToUsLayoutDomKey(dom_code, flags, out_dom_key, out_key_code); |
45 } | 49 } |
46 | 50 |
47 } // namespace ui | 51 } // namespace ui |
OLD | NEW |