OLD | NEW |
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/ui/toolbar/encoding_menu_controller.h" | 5 #include "chrome/browser/ui/toolbar/encoding_menu_controller.h" |
6 | 6 |
7 #include "app/l10n_util.h" | 7 #include "app/l10n_util.h" |
8 #include "base/i18n/rtl.h" | 8 #include "base/i18n/rtl.h" |
9 #include "base/utf_string_conversions.h" | 9 #include "base/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/prefs/pref_service.h" | 13 #include "chrome/browser/prefs/pref_service.h" |
14 #include "chrome/browser/profile.h" | 14 #include "chrome/browser/profiles/profile.h" |
15 #include "chrome/common/pref_names.h" | 15 #include "chrome/common/pref_names.h" |
16 #include "grit/generated_resources.h" | 16 #include "grit/generated_resources.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_ISO88591, | 21 IDC_ENCODING_ISO88591, |
22 IDC_ENCODING_WINDOWS1252, | 22 IDC_ENCODING_WINDOWS1252, |
23 IDC_ENCODING_GBK, | 23 IDC_ENCODING_GBK, |
24 IDC_ENCODING_GB18030, | 24 IDC_ENCODING_GB18030, |
(...skipping 107 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
132 if (it->encoding_id) { | 132 if (it->encoding_id) { |
133 std::wstring encoding = it->encoding_display_name; | 133 std::wstring encoding = it->encoding_display_name; |
134 base::i18n::AdjustStringForLocaleDirection(&encoding); | 134 base::i18n::AdjustStringForLocaleDirection(&encoding); |
135 menuItems->push_back(EncodingMenuItem(it->encoding_id, | 135 menuItems->push_back(EncodingMenuItem(it->encoding_id, |
136 WideToUTF16(encoding))); | 136 WideToUTF16(encoding))); |
137 } else { | 137 } else { |
138 menuItems->push_back(separator); | 138 menuItems->push_back(separator); |
139 } | 139 } |
140 } | 140 } |
141 } | 141 } |
OLD | NEW |