OLD | NEW |
1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2006-2008 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/encoding_menu_controller_delegate.h" | 5 #include "chrome/browser/encoding_menu_controller_delegate.h" |
6 | 6 |
| 7 #include "app/l10n_util.h" |
7 #include "chrome/app/chrome_dll_resource.h" | 8 #include "chrome/app/chrome_dll_resource.h" |
8 #include "chrome/browser/browser.h" | 9 #include "chrome/browser/browser.h" |
9 #include "chrome/browser/browser_process.h" | 10 #include "chrome/browser/browser_process.h" |
10 #include "chrome/browser/character_encoding.h" | 11 #include "chrome/browser/character_encoding.h" |
11 #include "chrome/browser/profile.h" | 12 #include "chrome/browser/profile.h" |
12 #include "chrome/browser/tab_contents/tab_contents.h" | 13 #include "chrome/browser/tab_contents/tab_contents.h" |
13 #include "chrome/common/l10n_util.h" | |
14 #include "chrome/common/pref_names.h" | 14 #include "chrome/common/pref_names.h" |
15 #include "chrome/common/pref_service.h" | 15 #include "chrome/common/pref_service.h" |
16 #include "grit/generated_resources.h" | 16 #include "grit/generated_resources.h" |
17 | 17 |
18 EncodingMenuControllerDelegate::EncodingMenuControllerDelegate(Browser* browser) | 18 EncodingMenuControllerDelegate::EncodingMenuControllerDelegate(Browser* browser) |
19 : browser_(browser) { | 19 : browser_(browser) { |
20 } | 20 } |
21 | 21 |
22 bool EncodingMenuControllerDelegate::IsItemChecked(int id) const { | 22 bool EncodingMenuControllerDelegate::IsItemChecked(int id) const { |
23 Profile* profile = browser_->profile(); | 23 Profile* profile = browser_->profile(); |
(...skipping 101 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
125 std::wstring bidi_safe_encoding; | 125 std::wstring bidi_safe_encoding; |
126 if (l10n_util::AdjustStringForLocaleDirection(encoding, | 126 if (l10n_util::AdjustStringForLocaleDirection(encoding, |
127 &bidi_safe_encoding)) | 127 &bidi_safe_encoding)) |
128 encoding.swap(bidi_safe_encoding); | 128 encoding.swap(bidi_safe_encoding); |
129 encoding_menu->AppendMenuItem(it->encoding_id, encoding, Menu::RADIO); | 129 encoding_menu->AppendMenuItem(it->encoding_id, encoding, Menu::RADIO); |
130 } else { | 130 } else { |
131 encoding_menu->AppendSeparator(); | 131 encoding_menu->AppendSeparator(); |
132 } | 132 } |
133 } | 133 } |
134 } | 134 } |
OLD | NEW |