OLD | NEW |
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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/views/autofill_profiles_view_win.h" | 5 #include "chrome/browser/views/autofill_profiles_view_win.h" |
6 | 6 |
7 #include <vsstyle.h> | 7 #include <vsstyle.h> |
8 #include <vssym32.h> | 8 #include <vssym32.h> |
9 | 9 |
10 #include "app/l10n_util.h" | 10 #include "app/l10n_util.h" |
(...skipping 1248 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1259 | 1259 |
1260 void AutoFillProfilesView::ContentListTableModel::UpdateItem(int index) { | 1260 void AutoFillProfilesView::ContentListTableModel::UpdateItem(int index) { |
1261 if (observer_) | 1261 if (observer_) |
1262 observer_->OnItemsChanged(index, 1); | 1262 observer_->OnItemsChanged(index, 1); |
1263 } | 1263 } |
1264 | 1264 |
1265 int AutoFillProfilesView::ContentListTableModel::RowCount() { | 1265 int AutoFillProfilesView::ContentListTableModel::RowCount() { |
1266 return profiles_->size() + credit_cards_->size(); | 1266 return profiles_->size() + credit_cards_->size(); |
1267 } | 1267 } |
1268 | 1268 |
1269 std::wstring AutoFillProfilesView::ContentListTableModel::GetText( | 1269 string16 AutoFillProfilesView::ContentListTableModel::GetText( |
1270 int row, int column_id) { | 1270 int row, int column_id) { |
1271 DCHECK(row < static_cast<int>(profiles_->size() + credit_cards_->size())); | 1271 DCHECK(row < static_cast<int>(profiles_->size() + credit_cards_->size())); |
1272 if (row < static_cast<int>(profiles_->size())) { | 1272 if (row < static_cast<int>(profiles_->size())) { |
1273 return profiles_->at(row).address.Label(); | 1273 return WideToUTF16Hack(profiles_->at(row).address.Label()); |
1274 } else { | 1274 } else { |
1275 row -= profiles_->size(); | 1275 row -= profiles_->size(); |
1276 return credit_cards_->at(row).credit_card.PreviewSummary(); | 1276 return WideToUTF16Hack(credit_cards_->at(row).credit_card.PreviewSummary()); |
1277 } | 1277 } |
1278 } | 1278 } |
1279 | 1279 |
1280 TableModel::Groups AutoFillProfilesView::ContentListTableModel::GetGroups() { | 1280 TableModel::Groups AutoFillProfilesView::ContentListTableModel::GetGroups() { |
1281 TableModel::Groups groups; | 1281 TableModel::Groups groups; |
1282 | 1282 |
1283 TableModel::Group profile_group; | 1283 TableModel::Group profile_group; |
1284 profile_group.title = l10n_util::GetString(IDS_AUTOFILL_ADDRESSES_GROUP_NAME); | 1284 profile_group.title = l10n_util::GetString(IDS_AUTOFILL_ADDRESSES_GROUP_NAME); |
1285 profile_group.id = kAddressGroup; | 1285 profile_group.id = kAddressGroup; |
1286 groups.push_back(profile_group); | 1286 groups.push_back(profile_group); |
(...skipping 23 matching lines...) Expand all Loading... |
1310 AutoFillDialogObserver* observer, | 1310 AutoFillDialogObserver* observer, |
1311 Profile* profile) { | 1311 Profile* profile) { |
1312 DCHECK(profile); | 1312 DCHECK(profile); |
1313 | 1313 |
1314 PersonalDataManager* personal_data_manager = | 1314 PersonalDataManager* personal_data_manager = |
1315 profile->GetPersonalDataManager(); | 1315 profile->GetPersonalDataManager(); |
1316 DCHECK(personal_data_manager); | 1316 DCHECK(personal_data_manager); |
1317 AutoFillProfilesView::Show(parent, observer, personal_data_manager, profile, | 1317 AutoFillProfilesView::Show(parent, observer, personal_data_manager, profile, |
1318 profile->GetPrefs(), NULL, NULL); | 1318 profile->GetPrefs(), NULL, NULL); |
1319 } | 1319 } |
OLD | NEW |