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

Side by Side Diff: chrome/browser/chromeos/status/language_menu_button.cc

Issue 2843044: Use the special language indicator for mozc-dv. (Closed)
Patch Set: Created 10 years, 5 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 | « no previous file | 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 (c) 2009 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2009 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 "chrome/browser/chromeos/status/language_menu_button.h" 5 #include "chrome/browser/chromeos/status/language_menu_button.h"
6 6
7 #include <string> 7 #include <string>
8 8
9 #include "app/l10n_util.h" 9 #include "app/l10n_util.h"
10 #include "app/resource_bundle.h" 10 #include "app/resource_bundle.h"
(...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after
76 // mapping is necessary since some input methods belong to the same language. 76 // mapping is necessary since some input methods belong to the same language.
77 // For example, both "xkb:us::eng" and "xkb:us:dvorak:eng" are for US English. 77 // For example, both "xkb:us::eng" and "xkb:us:dvorak:eng" are for US English.
78 const struct { 78 const struct {
79 const char* input_method_id; 79 const char* input_method_id;
80 const char* indicator_text; 80 const char* indicator_text;
81 } kMappingFromIdToIndicatorText[] = { 81 } kMappingFromIdToIndicatorText[] = {
82 // To distinguish from "xkb:us::eng" 82 // To distinguish from "xkb:us::eng"
83 { "xkb:us:dvorak:eng", "DV" }, 83 { "xkb:us:dvorak:eng", "DV" },
84 // To distinguish from "xkb:jp::jpn" 84 // To distinguish from "xkb:jp::jpn"
85 { "mozc", "\xe3\x81\x82" }, // Japanese Hiragana letter A in UTF-8. 85 { "mozc", "\xe3\x81\x82" }, // Japanese Hiragana letter A in UTF-8.
86 { "mozc-dv", "\xe3\x81\x82" },
86 { "mozc-jp", "\xe3\x81\x82" }, 87 { "mozc-jp", "\xe3\x81\x82" },
87 88
88 // Handle "m17n:t" input methods here since ICU is not able to handle the 89 // Handle "m17n:t" input methods here since ICU is not able to handle the
89 // language code "t". Note: most users use either latn-pre or latn-post 90 // language code "t". Note: most users use either latn-pre or latn-post
90 // methods, not both. The same is true for mozc/mozc-jp. 91 // methods, not both. The same is true for mozc/mozc-jp.
91 { "m17n:t:latn-pre", "LAT" }, 92 { "m17n:t:latn-pre", "LAT" },
92 { "m17n:t:latn-post", "LAT" }, 93 { "m17n:t:latn-post", "LAT" },
93 }; 94 };
94 const size_t kMappingFromIdToIndicatorTextLen = 95 const size_t kMappingFromIdToIndicatorTextLen =
95 ARRAYSIZE_UNSAFE(kMappingFromIdToIndicatorText); 96 ARRAYSIZE_UNSAFE(kMappingFromIdToIndicatorText);
(...skipping 547 matching lines...) Expand 10 before | Expand all | Expand 10 after
643 644
644 void LanguageMenuButton::Observe(NotificationType type, 645 void LanguageMenuButton::Observe(NotificationType type,
645 const NotificationSource& source, 646 const NotificationSource& source,
646 const NotificationDetails& details) { 647 const NotificationDetails& details) {
647 if (type == NotificationType::LOGIN_USER_CHANGED) { 648 if (type == NotificationType::LOGIN_USER_CHANGED) {
648 logged_in_ = true; 649 logged_in_ = true;
649 } 650 }
650 } 651 }
651 652
652 } // namespace chromeos 653 } // namespace chromeos
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698