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

Side by Side Diff: chromeos/ime/input_method_whitelist.cc

Issue 13949015: Supporting multiple keyboard layouts. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Addressing comment Created 7 years, 8 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 | Annotate | Revision Log
« no previous file with comments | « chromeos/ime/input_method_descriptor.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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 "chromeos/ime/input_method_whitelist.h" 5 #include "chromeos/ime/input_method_whitelist.h"
6 6
7 #include <vector> 7 #include <vector>
8 8
9 #include "chromeos/ime/input_method_descriptor.h" 9 #include "chromeos/ime/input_method_descriptor.h"
10 #include "chromeos/ime/input_methods.h" 10 #include "chromeos/ime/input_methods.h"
(...skipping 13 matching lines...) Expand all
24 bool InputMethodWhitelist::InputMethodIdIsWhitelisted( 24 bool InputMethodWhitelist::InputMethodIdIsWhitelisted(
25 const std::string& input_method_id) const { 25 const std::string& input_method_id) const {
26 return supported_input_methods_.count(input_method_id) > 0; 26 return supported_input_methods_.count(input_method_id) > 0;
27 } 27 }
28 28
29 scoped_ptr<InputMethodDescriptors> 29 scoped_ptr<InputMethodDescriptors>
30 InputMethodWhitelist::GetSupportedInputMethods() const { 30 InputMethodWhitelist::GetSupportedInputMethods() const {
31 scoped_ptr<InputMethodDescriptors> input_methods(new InputMethodDescriptors); 31 scoped_ptr<InputMethodDescriptors> input_methods(new InputMethodDescriptors);
32 input_methods->reserve(arraysize(kInputMethods)); 32 input_methods->reserve(arraysize(kInputMethods));
33 for (size_t i = 0; i < arraysize(kInputMethods); ++i) { 33 for (size_t i = 0; i < arraysize(kInputMethods); ++i) {
34 std::vector<std::string> layouts;
35 layouts.push_back(kInputMethods[i].xkb_layout_id);
36
34 input_methods->push_back(InputMethodDescriptor( 37 input_methods->push_back(InputMethodDescriptor(
35 kInputMethods[i].input_method_id, 38 kInputMethods[i].input_method_id,
36 "", 39 "",
37 kInputMethods[i].xkb_layout_id, 40 layouts,
38 kInputMethods[i].language_code, 41 kInputMethods[i].language_code,
39 "")); // options page url, not available for non-extension input 42 "")); // options page url, not available for non-extension input
40 // method. 43 // method.
41 } 44 }
42 return input_methods.Pass(); 45 return input_methods.Pass();
43 } 46 }
44 47
45 } // namespace input_method 48 } // namespace input_method
46 } // namespace chromeos 49 } // namespace chromeos
OLDNEW
« no previous file with comments | « chromeos/ime/input_method_descriptor.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698