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

Unified Diff: chromeos/ime/input_method_descriptor.h

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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chromeos/ime/component_extension_ime_manager_unittest.cc ('k') | chromeos/ime/input_method_descriptor.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chromeos/ime/input_method_descriptor.h
diff --git a/chromeos/ime/input_method_descriptor.h b/chromeos/ime/input_method_descriptor.h
index 29f4f027c1da9dcd7a9fa3473240c77fecf4e28f..fd0c27dd0ef40c7c37d685988e705b030faf3d44 100644
--- a/chromeos/ime/input_method_descriptor.h
+++ b/chromeos/ime/input_method_descriptor.h
@@ -14,37 +14,45 @@
namespace chromeos {
namespace input_method {
-class InputMethodWhitelist;
-
// A structure which represents an input method.
class CHROMEOS_EXPORT InputMethodDescriptor {
public:
InputMethodDescriptor();
InputMethodDescriptor(const std::string& id,
const std::string& name,
- const std::string& keyboard_layout,
+ const std::vector<std::string>& keyboard_layouts,
const std::string& language_code,
const std::string& options_page_url);
~InputMethodDescriptor();
+ // Accessors
const std::string& id() const { return id_; }
const std::string& name() const { return name_; }
- const std::string& keyboard_layout() const { return keyboard_layout_; }
const std::string& language_code() const { return language_code_; }
const std::string& options_page_url() const { return options_page_url_; }
+ const std::vector<std::string>& keyboard_layouts() const {
+ return keyboard_layouts_;
+ }
+
+ // Returns preferred keyboard layout.
+ std::string GetPreferredKeyboardLayout() const;
private:
// An ID that identifies an input method engine (e.g., "t:latn-post",
// "pinyin", "hangul").
std::string id_;
+
// A name used to specify the user-visible name of this input method. It is
// only used by extension IMEs, and should be blank for internal IMEs.
std::string name_;
+
// A preferred physical keyboard layout for the input method (e.g., "us",
// "us(dvorak)", "jp"). Comma separated layout names do NOT appear.
- std::string keyboard_layout_;
+ std::vector<std::string> keyboard_layouts_;
+
// Language code like "ko", "ja", "en-US", and "zh-CN".
std::string language_code_;
+
// Options page URL e.g.
// "chrome-extension://ceaajjmckiakobniehbjpdcidfpohlin/options.html".
// We can't use GURL here due to dependency policy. This field is valid only
« no previous file with comments | « chromeos/ime/component_extension_ime_manager_unittest.cc ('k') | chromeos/ime/input_method_descriptor.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698