OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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/autofill_dialog_views.h" | 5 #include "chrome/browser/ui/views/autofill/autofill_dialog_views.h" |
6 | 6 |
7 #include <utility> | 7 #include <utility> |
8 | 8 |
9 #include "base/utf_string_conversions.h" | 9 #include "base/utf_string_conversions.h" |
10 #include "chrome/browser/ui/autofill/autofill_dialog_controller.h" | 10 #include "chrome/browser/ui/autofill/autofill_dialog_controller.h" |
(...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
83 DCHECK(controller); | 83 DCHECK(controller); |
84 } | 84 } |
85 | 85 |
86 AutofillDialogViews::~AutofillDialogViews() { | 86 AutofillDialogViews::~AutofillDialogViews() { |
87 DCHECK(!window_); | 87 DCHECK(!window_); |
88 } | 88 } |
89 | 89 |
90 void AutofillDialogViews::Show() { | 90 void AutofillDialogViews::Show() { |
91 InitChildViews(); | 91 InitChildViews(); |
92 | 92 |
93 // Ownership of |contents_| is handed off by this call. The ConstrainedWindow | 93 // Ownership of |contents_| is handed off by this call. The |
94 // will take care of deleting itself after calling DeleteDelegate(). | 94 // WebContentsModalDialog will take care of deleting itself after calling |
| 95 // DeleteDelegate(). |
95 window_ = new ConstrainedWindowViews(controller_->web_contents(), this); | 96 window_ = new ConstrainedWindowViews(controller_->web_contents(), this); |
96 } | 97 } |
97 | 98 |
98 int AutofillDialogViews::GetSuggestionSelection(DialogSection section) { | 99 int AutofillDialogViews::GetSuggestionSelection(DialogSection section) { |
99 return GroupForSection(section)->suggested_input->selected_index(); | 100 return GroupForSection(section)->suggested_input->selected_index(); |
100 } | 101 } |
101 | 102 |
102 void AutofillDialogViews::GetUserInput(DialogSection section, | 103 void AutofillDialogViews::GetUserInput(DialogSection section, |
103 DetailOutputMap* output) { | 104 DetailOutputMap* output) { |
104 DetailsGroup* group = GroupForSection(section); | 105 DetailsGroup* group = GroupForSection(section); |
(...skipping 312 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
417 } | 418 } |
418 | 419 |
419 AutofillDialogViews::DetailsGroup::DetailsGroup() | 420 AutofillDialogViews::DetailsGroup::DetailsGroup() |
420 : container(NULL), | 421 : container(NULL), |
421 suggested_input(NULL), | 422 suggested_input(NULL), |
422 manual_input(NULL) {} | 423 manual_input(NULL) {} |
423 | 424 |
424 AutofillDialogViews::DetailsGroup::~DetailsGroup() {} | 425 AutofillDialogViews::DetailsGroup::~DetailsGroup() {} |
425 | 426 |
426 } // namespace autofill | 427 } // namespace autofill |
OLD | NEW |