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

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

Issue 13954012: Move GetFallbackInputMethodDescriptor function to InputMethodUtil. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: 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
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 #ifndef CHROMEOS_IME_INPUT_METHOD_DESCRIPTOR_H_ 5 #ifndef CHROMEOS_IME_INPUT_METHOD_DESCRIPTOR_H_
6 #define CHROMEOS_IME_INPUT_METHOD_DESCRIPTOR_H_ 6 #define CHROMEOS_IME_INPUT_METHOD_DESCRIPTOR_H_
7 7
8 #include <string> 8 #include <string>
9 #include <vector> 9 #include <vector>
10 10
(...skipping 13 matching lines...) Expand all
24 const std::string& name, 24 const std::string& name,
25 const std::string& keyboard_layout, 25 const std::string& keyboard_layout,
26 const std::string& language_code, 26 const std::string& language_code,
27 const std::string& options_page_url, 27 const std::string& options_page_url,
28 bool third_party); 28 bool third_party);
29 ~InputMethodDescriptor(); 29 ~InputMethodDescriptor();
30 30
31 bool operator==(const InputMethodDescriptor& other) const; 31 bool operator==(const InputMethodDescriptor& other) const;
32 bool operator!=(const InputMethodDescriptor& other) const; 32 bool operator!=(const InputMethodDescriptor& other) const;
33 33
34 // Debug print function.
35 std::string ToString() const;
36
37 const std::string& id() const { return id_; } 34 const std::string& id() const { return id_; }
38 const std::string& name() const { return name_; } 35 const std::string& name() const { return name_; }
39 const std::string& keyboard_layout() const { return keyboard_layout_; } 36 const std::string& keyboard_layout() const { return keyboard_layout_; }
40 const std::string& language_code() const { return language_code_; } 37 const std::string& language_code() const { return language_code_; }
41 const std::string& options_page_url() const { return options_page_url_; } 38 const std::string& options_page_url() const { return options_page_url_; }
42 bool third_party() const { return third_party_; } 39 bool third_party() const { return third_party_; }
43 40
44 // Returns the fallback input method descriptor (the very basic US
45 // keyboard). This function is mostly used for testing, but may be used
46 // as the fallback, when there is no other choice.
47 static InputMethodDescriptor GetFallbackInputMethodDescriptor();
48
49 private: 41 private:
50 // An ID that identifies an input method engine (e.g., "t:latn-post", 42 // An ID that identifies an input method engine (e.g., "t:latn-post",
51 // "pinyin", "hangul"). 43 // "pinyin", "hangul").
52 std::string id_; 44 std::string id_;
53 // A name used to specify the user-visible name of this input method. It is 45 // A name used to specify the user-visible name of this input method. It is
54 // only used by extension IMEs, and should be blank for internal IMEs. 46 // only used by extension IMEs, and should be blank for internal IMEs.
55 std::string name_; 47 std::string name_;
56 // A preferred physical keyboard layout for the input method (e.g., "us", 48 // A preferred physical keyboard layout for the input method (e.g., "us",
57 // "us(dvorak)", "jp"). Comma separated layout names do NOT appear. 49 // "us(dvorak)", "jp"). Comma separated layout names do NOT appear.
58 std::string keyboard_layout_; 50 std::string keyboard_layout_;
59 // Language code like "ko", "ja", "en-US", and "zh-CN". 51 // Language code like "ko", "ja", "en-US", and "zh-CN".
60 std::string language_code_; 52 std::string language_code_;
61 // Options page URL e.g. 53 // Options page URL e.g.
62 // "chrome-extension://ceaajjmckiakobniehbjpdcidfpohlin/options.html". 54 // "chrome-extension://ceaajjmckiakobniehbjpdcidfpohlin/options.html".
63 // We can't use GURL here due to dependency policy. This field is valid only 55 // We can't use GURL here due to dependency policy. This field is valid only
64 // for input method extension. 56 // for input method extension.
65 std::string options_page_url_; 57 std::string options_page_url_;
66 // Indicates if this is a third party ime 58 // Indicates if this is a third party ime
67 bool third_party_; 59 bool third_party_;
68 }; 60 };
69 61
70 typedef std::vector<InputMethodDescriptor> InputMethodDescriptors; 62 typedef std::vector<InputMethodDescriptor> InputMethodDescriptors;
71 63
72 } // namespace input_method 64 } // namespace input_method
73 } // namespace chromeos 65 } // namespace chromeos
74 66
75 #endif // CHROMEOS_IME_INPUT_METHOD_DESCRIPTOR_H_ 67 #endif // CHROMEOS_IME_INPUT_METHOD_DESCRIPTOR_H_
OLDNEW
« no previous file with comments | « chrome/browser/chromeos/input_method/mock_input_method_manager.cc ('k') | chromeos/ime/input_method_descriptor.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698