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

Side by Side Diff: chrome/browser/ui/toolbar/encoding_menu_controller.cc

Issue 1024713002: Drop Big5-HKSCS and add IBM866 in the encoding menu. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: add ibm866 Created 5 years, 9 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
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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/ui/toolbar/encoding_menu_controller.h" 5 #include "chrome/browser/ui/toolbar/encoding_menu_controller.h"
6 6
7 #include "base/i18n/rtl.h" 7 #include "base/i18n/rtl.h"
8 #include "base/prefs/pref_service.h" 8 #include "base/prefs/pref_service.h"
9 #include "base/strings/utf_string_conversions.h" 9 #include "base/strings/utf_string_conversions.h"
10 #include "chrome/app/chrome_command_ids.h" 10 #include "chrome/app/chrome_command_ids.h"
11 #include "chrome/browser/browser_process.h" 11 #include "chrome/browser/browser_process.h"
12 #include "chrome/browser/character_encoding.h" 12 #include "chrome/browser/character_encoding.h"
13 #include "chrome/browser/profiles/profile.h" 13 #include "chrome/browser/profiles/profile.h"
14 #include "chrome/common/pref_names.h" 14 #include "chrome/common/pref_names.h"
15 #include "chrome/grit/generated_resources.h" 15 #include "chrome/grit/generated_resources.h"
16 #include "ui/base/l10n/l10n_util.h" 16 #include "ui/base/l10n/l10n_util.h"
17 17
18 const int EncodingMenuController::kValidEncodingIds[] = { 18 const int EncodingMenuController::kValidEncodingIds[] = {
19 IDC_ENCODING_UTF8, 19 IDC_ENCODING_UTF8,
20 IDC_ENCODING_UTF16LE, 20 IDC_ENCODING_UTF16LE,
21 IDC_ENCODING_WINDOWS1252, 21 IDC_ENCODING_WINDOWS1252,
22 IDC_ENCODING_GBK, 22 IDC_ENCODING_GBK,
23 IDC_ENCODING_GB18030, 23 IDC_ENCODING_GB18030,
24 IDC_ENCODING_BIG5, 24 IDC_ENCODING_BIG5,
25 IDC_ENCODING_BIG5HKSCS,
26 IDC_ENCODING_KOREAN, 25 IDC_ENCODING_KOREAN,
27 IDC_ENCODING_SHIFTJIS, 26 IDC_ENCODING_SHIFTJIS,
28 IDC_ENCODING_ISO2022JP, 27 IDC_ENCODING_ISO2022JP,
29 IDC_ENCODING_EUCJP, 28 IDC_ENCODING_EUCJP,
30 IDC_ENCODING_THAI, 29 IDC_ENCODING_THAI,
31 IDC_ENCODING_ISO885915, 30 IDC_ENCODING_ISO885915,
32 IDC_ENCODING_MACINTOSH, 31 IDC_ENCODING_MACINTOSH,
33 IDC_ENCODING_ISO88592, 32 IDC_ENCODING_ISO88592,
34 IDC_ENCODING_WINDOWS1250, 33 IDC_ENCODING_WINDOWS1250,
35 IDC_ENCODING_ISO88595, 34 IDC_ENCODING_ISO88595,
36 IDC_ENCODING_WINDOWS1251, 35 IDC_ENCODING_WINDOWS1251,
37 IDC_ENCODING_KOI8R, 36 IDC_ENCODING_KOI8R,
38 IDC_ENCODING_KOI8U, 37 IDC_ENCODING_KOI8U,
38 IDC_ENCODING_IBM866,
39 IDC_ENCODING_ISO88597, 39 IDC_ENCODING_ISO88597,
40 IDC_ENCODING_WINDOWS1253, 40 IDC_ENCODING_WINDOWS1253,
41 IDC_ENCODING_ISO88594, 41 IDC_ENCODING_ISO88594,
42 IDC_ENCODING_ISO885913, 42 IDC_ENCODING_ISO885913,
43 IDC_ENCODING_WINDOWS1257, 43 IDC_ENCODING_WINDOWS1257,
44 IDC_ENCODING_ISO88593, 44 IDC_ENCODING_ISO88593,
45 IDC_ENCODING_ISO885910, 45 IDC_ENCODING_ISO885910,
46 IDC_ENCODING_ISO885914, 46 IDC_ENCODING_ISO885914,
47 IDC_ENCODING_ISO885916, 47 IDC_ENCODING_ISO885916,
48 IDC_ENCODING_WINDOWS1254, 48 IDC_ENCODING_WINDOWS1254,
(...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after
130 for (it = encodings->begin(); it != encodings->end(); ++it) { 130 for (it = encodings->begin(); it != encodings->end(); ++it) {
131 if (it->encoding_id) { 131 if (it->encoding_id) {
132 base::string16 encoding = it->encoding_display_name; 132 base::string16 encoding = it->encoding_display_name;
133 base::i18n::AdjustStringForLocaleDirection(&encoding); 133 base::i18n::AdjustStringForLocaleDirection(&encoding);
134 menu_items->push_back(EncodingMenuItem(it->encoding_id, encoding)); 134 menu_items->push_back(EncodingMenuItem(it->encoding_id, encoding));
135 } else { 135 } else {
136 menu_items->push_back(separator); 136 menu_items->push_back(separator);
137 } 137 }
138 } 138 }
139 } 139 }
OLDNEW
« chrome/app/chrome_command_ids.h ('K') | « chrome/browser/ui/browser_command_controller.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698