| 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 806 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 817 | 817 |
| 818 void AutoFillProfilesView::EditableSetViewContents::WindowClosing() { | 818 void AutoFillProfilesView::EditableSetViewContents::WindowClosing() { |
| 819 observer_->ChildWindowClosed(); | 819 observer_->ChildWindowClosed(); |
| 820 } | 820 } |
| 821 | 821 |
| 822 views::View* AutoFillProfilesView::EditableSetViewContents::GetContentsView() { | 822 views::View* AutoFillProfilesView::EditableSetViewContents::GetContentsView() { |
| 823 return this; | 823 return this; |
| 824 } | 824 } |
| 825 | 825 |
| 826 bool AutoFillProfilesView::EditableSetViewContents::Cancel() { | 826 bool AutoFillProfilesView::EditableSetViewContents::Cancel() { |
| 827 if (new_item_) { | |
| 828 // Remove added item - it is last in the list. | |
| 829 if (temporary_info_.is_address) { | |
| 830 observer_->profiles_set_.pop_back(); | |
| 831 } else { | |
| 832 observer_->credit_card_set_.pop_back(); | |
| 833 } | |
| 834 } | |
| 835 return true; | 827 return true; |
| 836 } | 828 } |
| 837 | 829 |
| 838 bool AutoFillProfilesView::EditableSetViewContents::Accept() { | 830 bool AutoFillProfilesView::EditableSetViewContents::Accept() { |
| 839 observer_->EditAccepted(&temporary_info_, new_item_); | 831 observer_->EditAccepted(&temporary_info_, new_item_); |
| 840 return true; | 832 return true; |
| 841 } | 833 } |
| 842 | 834 |
| 843 ///////////////////////////////////////////////////////////////////////////// | 835 ///////////////////////////////////////////////////////////////////////////// |
| 844 // AutoFillProfilesView::EditableSetViewContents, | 836 // AutoFillProfilesView::EditableSetViewContents, |
| (...skipping 473 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1318 AutoFillDialogObserver* observer, | 1310 AutoFillDialogObserver* observer, |
| 1319 Profile* profile) { | 1311 Profile* profile) { |
| 1320 DCHECK(profile); | 1312 DCHECK(profile); |
| 1321 | 1313 |
| 1322 PersonalDataManager* personal_data_manager = | 1314 PersonalDataManager* personal_data_manager = |
| 1323 profile->GetPersonalDataManager(); | 1315 profile->GetPersonalDataManager(); |
| 1324 DCHECK(personal_data_manager); | 1316 DCHECK(personal_data_manager); |
| 1325 AutoFillProfilesView::Show(parent, observer, personal_data_manager, profile, | 1317 AutoFillProfilesView::Show(parent, observer, personal_data_manager, profile, |
| 1326 profile->GetPrefs(), NULL, NULL); | 1318 profile->GetPrefs(), NULL, NULL); |
| 1327 } | 1319 } |
| OLD | NEW |