| 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 "chrome/app/chrome_dll_resource.h" | 7 #include "chrome/app/chrome_dll_resource.h" |
| 8 #include "chrome/browser/browser.h" | 8 #include "chrome/browser/browser.h" |
| 9 #include "chrome/browser/browser_process.h" | 9 #include "chrome/browser/browser_process.h" |
| 10 #include "chrome/browser/character_encoding.h" | 10 #include "chrome/browser/character_encoding.h" |
| (...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 62 case IDC_ENCODING_ISO885913: | 62 case IDC_ENCODING_ISO885913: |
| 63 case IDC_ENCODING_WINDOWS1257: | 63 case IDC_ENCODING_WINDOWS1257: |
| 64 case IDC_ENCODING_ISO88593: | 64 case IDC_ENCODING_ISO88593: |
| 65 case IDC_ENCODING_ISO885910: | 65 case IDC_ENCODING_ISO885910: |
| 66 case IDC_ENCODING_ISO885914: | 66 case IDC_ENCODING_ISO885914: |
| 67 case IDC_ENCODING_ISO885916: | 67 case IDC_ENCODING_ISO885916: |
| 68 case IDC_ENCODING_WINDOWS1254: | 68 case IDC_ENCODING_WINDOWS1254: |
| 69 case IDC_ENCODING_ISO88596: | 69 case IDC_ENCODING_ISO88596: |
| 70 case IDC_ENCODING_WINDOWS1256: | 70 case IDC_ENCODING_WINDOWS1256: |
| 71 case IDC_ENCODING_ISO88598: | 71 case IDC_ENCODING_ISO88598: |
| 72 case IDC_ENCODING_ISO88598I: |
| 72 case IDC_ENCODING_WINDOWS1255: | 73 case IDC_ENCODING_WINDOWS1255: |
| 73 case IDC_ENCODING_WINDOWS1258: | 74 case IDC_ENCODING_WINDOWS1258: |
| 74 return (!encoding.empty() && encoding == | 75 return (!encoding.empty() && encoding == |
| 75 CharacterEncoding::GetCanonicalEncodingNameByCommandId(id)); | 76 CharacterEncoding::GetCanonicalEncodingNameByCommandId(id)); |
| 76 default: | 77 default: |
| 77 return false; | 78 return false; |
| 78 } | 79 } |
| 79 } | 80 } |
| 80 | 81 |
| 81 bool EncodingMenuControllerDelegate::SupportsCommand(int id) const { | 82 bool EncodingMenuControllerDelegate::SupportsCommand(int id) const { |
| (...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 127 if (l10n_util::AdjustStringForLocaleDirection(encoding, | 128 if (l10n_util::AdjustStringForLocaleDirection(encoding, |
| 128 &bidi_safe_encoding)) | 129 &bidi_safe_encoding)) |
| 129 encoding.swap(bidi_safe_encoding); | 130 encoding.swap(bidi_safe_encoding); |
| 130 encoding_menu->AppendMenuItem(it->encoding_id, encoding, Menu::RADIO); | 131 encoding_menu->AppendMenuItem(it->encoding_id, encoding, Menu::RADIO); |
| 131 } else { | 132 } else { |
| 132 encoding_menu->AppendSeparator(); | 133 encoding_menu->AppendSeparator(); |
| 133 } | 134 } |
| 134 } | 135 } |
| 135 } | 136 } |
| 136 | 137 |
| OLD | NEW |