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

Side by Side Diff: ui/events/ozone/layout/stub/stub_keyboard_layout_engine.cc

Issue 2645703005: Add a KeyboardLayoutEngine::SetCurrentLayoutFromBuffer implementation (Closed)
Patch Set: . 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 #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::SetCurrentLayoutFromString(
31 const std::string& keymap_str) {
32 return false;
33 }
34
32 bool StubKeyboardLayoutEngine::UsesISOLevel5Shift() const { 35 bool StubKeyboardLayoutEngine::UsesISOLevel5Shift() const {
33 return false; 36 return false;
34 } 37 }
35 38
36 bool StubKeyboardLayoutEngine::UsesAltGr() const { 39 bool StubKeyboardLayoutEngine::UsesAltGr() const {
37 return true; 40 return true;
38 } 41 }
39 42
40 bool StubKeyboardLayoutEngine::Lookup(DomCode dom_code, 43 bool StubKeyboardLayoutEngine::Lookup(DomCode dom_code,
41 int flags, 44 int flags,
42 DomKey* out_dom_key, 45 DomKey* out_dom_key,
43 KeyboardCode* out_key_code) const { 46 KeyboardCode* out_key_code) const {
44 return DomCodeToUsLayoutDomKey(dom_code, flags, out_dom_key, out_key_code); 47 return DomCodeToUsLayoutDomKey(dom_code, flags, out_dom_key, out_key_code);
45 } 48 }
46 49
47 } // namespace ui 50 } // namespace ui
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698