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/bind.h" | 9 #include "base/bind.h" |
10 #include "base/strings/utf_string_conversions.h" | 10 #include "base/strings/utf_string_conversions.h" |
(...skipping 1126 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1137 } | 1137 } |
1138 } | 1138 } |
1139 // If we don't find a match, return the combobox to its default state. | 1139 // If we don't find a match, return the combobox to its default state. |
1140 combobox->SetSelectedIndex(combobox->model()->GetDefaultIndex()); | 1140 combobox->SetSelectedIndex(combobox->model()->GetDefaultIndex()); |
1141 return; | 1141 return; |
1142 } | 1142 } |
1143 | 1143 |
1144 NOTREACHED(); | 1144 NOTREACHED(); |
1145 } | 1145 } |
1146 | 1146 |
1147 void AutofillDialogViews::SetTextContentsOfSuggestionInput( | |
1148 DialogSection section, | |
1149 const base::string16& text) { | |
1150 GroupForSection(section)->suggested_info->decorated_textfield()-> | |
1151 textfield()->SetText(text); | |
Evan Stade
2013/06/20 21:56:24
(this will have a minor conflict with a recent pat
| |
1152 } | |
1153 | |
1147 void AutofillDialogViews::ActivateInput(const DetailInput& input) { | 1154 void AutofillDialogViews::ActivateInput(const DetailInput& input) { |
1148 TextfieldEditedOrActivated(TextfieldForInput(input), false); | 1155 TextfieldEditedOrActivated(TextfieldForInput(input), false); |
1149 } | 1156 } |
1150 | 1157 |
1151 gfx::Size AutofillDialogViews::GetSize() const { | 1158 gfx::Size AutofillDialogViews::GetSize() const { |
1152 return GetWidget() ? GetWidget()->GetRootView()->size() : gfx::Size(); | 1159 return GetWidget() ? GetWidget()->GetRootView()->size() : gfx::Size(); |
1153 } | 1160 } |
1154 | 1161 |
1155 bool AutofillDialogViews::AcceleratorPressed( | 1162 bool AutofillDialogViews::AcceleratorPressed( |
1156 const ui::Accelerator& accelerator) { | 1163 const ui::Accelerator& accelerator) { |
(...skipping 780 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1937 AutofillDialogViews::DetailsGroup::DetailsGroup(DialogSection section) | 1944 AutofillDialogViews::DetailsGroup::DetailsGroup(DialogSection section) |
1938 : section(section), | 1945 : section(section), |
1939 container(NULL), | 1946 container(NULL), |
1940 manual_input(NULL), | 1947 manual_input(NULL), |
1941 suggested_info(NULL), | 1948 suggested_info(NULL), |
1942 suggested_button(NULL) {} | 1949 suggested_button(NULL) {} |
1943 | 1950 |
1944 AutofillDialogViews::DetailsGroup::~DetailsGroup() {} | 1951 AutofillDialogViews::DetailsGroup::~DetailsGroup() {} |
1945 | 1952 |
1946 } // namespace autofill | 1953 } // namespace autofill |
OLD | NEW |