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

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

Issue 13042007: Extract input_method_whitelist.{h|cc} from c/b/chromeos. (2nd try) (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: replicate input_methods.txt for migration 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
« no previous file with comments | « chromeos/ime/input_method.gyp ('k') | chromeos/ime/input_method_whitelist.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 (c) 2012 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 #ifndef CHROME_BROWSER_CHROMEOS_INPUT_METHOD_INPUT_METHOD_WHITELIST_H_ 5 #ifndef CHROMEOS_IME_INPUT_METHOD_WHITELIST_H_
6 #define CHROME_BROWSER_CHROMEOS_INPUT_METHOD_INPUT_METHOD_WHITELIST_H_ 6 #define CHROMEOS_IME_INPUT_METHOD_WHITELIST_H_
7 7
8 #include <set> 8 #include <set>
9 #include <string> 9 #include <string>
10 #include <vector> 10 #include <vector>
11 11
12 #include "base/basictypes.h" 12 #include "base/basictypes.h"
13 #include "base/memory/scoped_ptr.h" 13 #include "base/memory/scoped_ptr.h"
14 #include "chromeos/chromeos_export.h"
14 15
15 namespace chromeos { 16 namespace chromeos {
16 namespace input_method { 17 namespace input_method {
17 18
18 class InputMethodDescriptor; 19 class InputMethodDescriptor;
19 typedef std::vector<InputMethodDescriptor> InputMethodDescriptors; 20 typedef std::vector<InputMethodDescriptor> InputMethodDescriptors;
20 21
21 // 22 // A class which has white listed input method list. The list is generated by
22 class InputMethodWhitelist { 23 // gen_input_methods.py from input_methods.txt.
24 class CHROMEOS_EXPORT InputMethodWhitelist {
23 public: 25 public:
24 InputMethodWhitelist(); 26 InputMethodWhitelist();
25 ~InputMethodWhitelist(); 27 ~InputMethodWhitelist();
26 28
27 // Returns true if |input_method_id| is whitelisted. 29 // Returns true if |input_method_id| is whitelisted.
28 bool InputMethodIdIsWhitelisted(const std::string& input_method_id) const; 30 bool InputMethodIdIsWhitelisted(const std::string& input_method_id) const;
29 31
30 // Returns all input methods that are supported, including ones not active. 32 // Returns all input methods that are supported, including ones not active.
31 // This function never returns NULL. Note that input method extensions are not 33 // This function never returns NULL. Note that input method extensions are not
32 // included in the result. 34 // included in the result.
33 scoped_ptr<InputMethodDescriptors> GetSupportedInputMethods() const; 35 scoped_ptr<InputMethodDescriptors> GetSupportedInputMethods() const;
34 36
35 private: 37 private:
36 std::set<std::string> supported_input_methods_; 38 std::set<std::string> supported_input_methods_;
37 39
38 DISALLOW_COPY_AND_ASSIGN(InputMethodWhitelist); 40 DISALLOW_COPY_AND_ASSIGN(InputMethodWhitelist);
39 }; 41 };
40 42
41 } // namespace input_method 43 } // namespace input_method
42 } // namespace chromeos 44 } // namespace chromeos
43 45
44 #endif // CHROME_BROWSER_CHROMEOS_INPUT_METHOD_INPUT_METHOD_WHITELIST_H_ 46 #endif // CHROMEOS_IME_INPUT_METHOD_WHITELIST_H_
OLDNEW
« no previous file with comments | « chromeos/ime/input_method.gyp ('k') | chromeos/ime/input_method_whitelist.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698