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 1134 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1145 } | 1145 } |
1146 | 1146 |
1147 void AutofillDialogViews::ActivateInput(const DetailInput& input) { | 1147 void AutofillDialogViews::ActivateInput(const DetailInput& input) { |
1148 TextfieldEditedOrActivated(TextfieldForInput(input), false); | 1148 TextfieldEditedOrActivated(TextfieldForInput(input), false); |
1149 } | 1149 } |
1150 | 1150 |
1151 gfx::Size AutofillDialogViews::GetSize() const { | 1151 gfx::Size AutofillDialogViews::GetSize() const { |
1152 return GetWidget() ? GetWidget()->GetRootView()->size() : gfx::Size(); | 1152 return GetWidget() ? GetWidget()->GetRootView()->size() : gfx::Size(); |
1153 } | 1153 } |
1154 | 1154 |
1155 void AutofillDialogViews::SetCvc(const base::string16& cvc) { | |
Evan Stade
2013/06/20 03:15:53
this should be generic:
SetTextContentsOfSuggesti
Dan Beam
2013/06/20 16:22:53
does that mean we should eventually change GetCvc(
Evan Stade
2013/06/20 21:56:24
maybe
| |
1156 DCHECK(controller_->SectionIsActive(SECTION_CC)); | |
1157 GroupForSection(SECTION_CC)->suggested_info->decorated_textfield()-> | |
1158 textfield()->SetText(cvc); | |
1159 } | |
1160 | |
1155 bool AutofillDialogViews::AcceleratorPressed( | 1161 bool AutofillDialogViews::AcceleratorPressed( |
1156 const ui::Accelerator& accelerator) { | 1162 const ui::Accelerator& accelerator) { |
1157 ui::KeyboardCode key = accelerator.key_code(); | 1163 ui::KeyboardCode key = accelerator.key_code(); |
1158 if (key == ui::VKEY_BACK) | 1164 if (key == ui::VKEY_BACK) |
1159 return true; | 1165 return true; |
1160 return false; | 1166 return false; |
1161 } | 1167 } |
1162 | 1168 |
1163 bool AutofillDialogViews::CanHandleAccelerators() const { | 1169 bool AutofillDialogViews::CanHandleAccelerators() const { |
1164 return true; | 1170 return true; |
(...skipping 772 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1937 AutofillDialogViews::DetailsGroup::DetailsGroup(DialogSection section) | 1943 AutofillDialogViews::DetailsGroup::DetailsGroup(DialogSection section) |
1938 : section(section), | 1944 : section(section), |
1939 container(NULL), | 1945 container(NULL), |
1940 manual_input(NULL), | 1946 manual_input(NULL), |
1941 suggested_info(NULL), | 1947 suggested_info(NULL), |
1942 suggested_button(NULL) {} | 1948 suggested_button(NULL) {} |
1943 | 1949 |
1944 AutofillDialogViews::DetailsGroup::~DetailsGroup() {} | 1950 AutofillDialogViews::DetailsGroup::~DetailsGroup() {} |
1945 | 1951 |
1946 } // namespace autofill | 1952 } // namespace autofill |
OLD | NEW |