| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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/views/autofill_profiles_view_win.h" | 5 #include "chrome/browser/ui/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 "base/message_loop.h" | 10 #include "base/message_loop.h" |
| (...skipping 24 matching lines...) Expand all Loading... |
| 35 #include "ui/gfx/size.h" | 35 #include "ui/gfx/size.h" |
| 36 #include "views/border.h" | 36 #include "views/border.h" |
| 37 #include "views/controls/button/image_button.h" | 37 #include "views/controls/button/image_button.h" |
| 38 #include "views/controls/button/native_button.h" | 38 #include "views/controls/button/native_button.h" |
| 39 #include "views/controls/button/radio_button.h" | 39 #include "views/controls/button/radio_button.h" |
| 40 #include "views/controls/button/text_button.h" | 40 #include "views/controls/button/text_button.h" |
| 41 #include "views/controls/label.h" | 41 #include "views/controls/label.h" |
| 42 #include "views/controls/scroll_view.h" | 42 #include "views/controls/scroll_view.h" |
| 43 #include "views/controls/separator.h" | 43 #include "views/controls/separator.h" |
| 44 #include "views/controls/table/table_view.h" | 44 #include "views/controls/table/table_view.h" |
| 45 #include "views/controls/textfield/textfield.h" |
| 45 #include "views/layout/grid_layout.h" | 46 #include "views/layout/grid_layout.h" |
| 46 #include "views/layout/layout_constants.h" | 47 #include "views/layout/layout_constants.h" |
| 47 #include "views/window/window.h" | 48 #include "views/window/window.h" |
| 48 | 49 |
| 49 namespace { | 50 namespace { |
| 50 | 51 |
| 51 // padding on the sides of AutoFill settings dialog. | 52 // padding on the sides of AutoFill settings dialog. |
| 52 const int kDialogPadding = 7; | 53 const int kDialogPadding = 7; |
| 53 | 54 |
| 54 // Insets for subview controls. | 55 // Insets for subview controls. |
| (...skipping 779 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 834 ///////////////////////////////////////////////////////////////////////////// | 835 ///////////////////////////////////////////////////////////////////////////// |
| 835 // AutoFillProfilesView::EditableSetViewContents, | 836 // AutoFillProfilesView::EditableSetViewContents, |
| 836 // views::ButtonListener implementations | 837 // views::ButtonListener implementations |
| 837 void AutoFillProfilesView::EditableSetViewContents::ButtonPressed( | 838 void AutoFillProfilesView::EditableSetViewContents::ButtonPressed( |
| 838 views::Button* sender, const views::Event& event) { | 839 views::Button* sender, const views::Event& event) { |
| 839 NOTREACHED(); | 840 NOTREACHED(); |
| 840 } | 841 } |
| 841 | 842 |
| 842 ///////////////////////////////////////////////////////////////////////////// | 843 ///////////////////////////////////////////////////////////////////////////// |
| 843 // AutoFillProfilesView::EditableSetViewContents, | 844 // AutoFillProfilesView::EditableSetViewContents, |
| 844 // views::Textfield::Controller implementations | 845 // views::TextfieldController implementations: |
| 845 void AutoFillProfilesView::EditableSetViewContents::ContentsChanged( | 846 void AutoFillProfilesView::EditableSetViewContents::ContentsChanged( |
| 846 views::Textfield* sender, const string16& new_contents) { | 847 views::Textfield* sender, const string16& new_contents) { |
| 847 if (temporary_info_.is_address) { | 848 if (temporary_info_.is_address) { |
| 848 for (int field = 0; field < arraysize(address_fields_); ++field) { | 849 for (int field = 0; field < arraysize(address_fields_); ++field) { |
| 849 DCHECK(text_fields_[address_fields_[field].text_field]); | 850 DCHECK(text_fields_[address_fields_[field].text_field]); |
| 850 if (text_fields_[address_fields_[field].text_field] == sender) { | 851 if (text_fields_[address_fields_[field].text_field] == sender) { |
| 851 if (!UpdateContentsPhoneViews(address_fields_[field].text_field, | 852 if (!UpdateContentsPhoneViews(address_fields_[field].text_field, |
| 852 sender, new_contents)) { | 853 sender, new_contents)) { |
| 853 temporary_info_.address.SetInfo( | 854 temporary_info_.address.SetInfo( |
| 854 AutoFillType(address_fields_[field].type), new_contents); | 855 AutoFillType(address_fields_[field].type), new_contents); |
| (...skipping 459 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1314 AutoFillDialogObserver* observer, | 1315 AutoFillDialogObserver* observer, |
| 1315 Profile* profile) { | 1316 Profile* profile) { |
| 1316 DCHECK(profile); | 1317 DCHECK(profile); |
| 1317 | 1318 |
| 1318 PersonalDataManager* personal_data_manager = | 1319 PersonalDataManager* personal_data_manager = |
| 1319 profile->GetPersonalDataManager(); | 1320 profile->GetPersonalDataManager(); |
| 1320 DCHECK(personal_data_manager); | 1321 DCHECK(personal_data_manager); |
| 1321 AutoFillProfilesView::Show(parent, observer, personal_data_manager, profile, | 1322 AutoFillProfilesView::Show(parent, observer, personal_data_manager, profile, |
| 1322 profile->GetPrefs(), NULL, NULL); | 1323 profile->GetPrefs(), NULL, NULL); |
| 1323 } | 1324 } |
| OLD | NEW |