Chromium Code Reviews| 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/autofill/autofill_popup_controller_impl.h" | 5 #include "chrome/browser/ui/autofill/autofill_popup_controller_impl.h" |
| 6 | 6 |
| 7 #include <algorithm> | 7 #include <algorithm> |
| 8 #include <utility> | 8 #include <utility> |
| 9 | 9 |
| 10 #include "base/command_line.h" | 10 #include "base/command_line.h" |
| (...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 63 base::WeakPtr<AutofillPopupDelegate> delegate, | 63 base::WeakPtr<AutofillPopupDelegate> delegate, |
| 64 content::WebContents* web_contents, | 64 content::WebContents* web_contents, |
| 65 gfx::NativeView container_view, | 65 gfx::NativeView container_view, |
| 66 const gfx::RectF& element_bounds, | 66 const gfx::RectF& element_bounds, |
| 67 base::i18n::TextDirection text_direction) | 67 base::i18n::TextDirection text_direction) |
| 68 : controller_common_(new PopupControllerCommon(element_bounds, | 68 : controller_common_(new PopupControllerCommon(element_bounds, |
| 69 text_direction, | 69 text_direction, |
| 70 container_view, | 70 container_view, |
| 71 web_contents)), | 71 web_contents)), |
| 72 view_(NULL), | 72 view_(NULL), |
| 73 layout_model_(this), | 73 layout_model_(this, delegate->IsCreditCardField()), |
|
Mathieu
2016/12/01 21:59:46
as mentioned, would prefer IsCreditCardPopup to ma
csashi
2016/12/02 05:15:29
Done.
| |
| 74 delegate_(delegate), | 74 delegate_(delegate), |
| 75 weak_ptr_factory_(this) { | 75 weak_ptr_factory_(this) { |
| 76 ClearState(); | 76 ClearState(); |
| 77 controller_common_->SetKeyPressCallback( | 77 controller_common_->SetKeyPressCallback( |
| 78 base::Bind(&AutofillPopupControllerImpl::HandleKeyPressEvent, | 78 base::Bind(&AutofillPopupControllerImpl::HandleKeyPressEvent, |
| 79 base::Unretained(this))); | 79 base::Unretained(this))); |
| 80 } | 80 } |
| 81 | 81 |
| 82 AutofillPopupControllerImpl::~AutofillPopupControllerImpl() {} | 82 AutofillPopupControllerImpl::~AutofillPopupControllerImpl() {} |
| 83 | 83 |
| (...skipping 455 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 539 // Don't clear view_, because otherwise the popup will have to get regenerated | 539 // Don't clear view_, because otherwise the popup will have to get regenerated |
| 540 // and this will cause flickering. | 540 // and this will cause flickering. |
| 541 suggestions_.clear(); | 541 suggestions_.clear(); |
| 542 elided_values_.clear(); | 542 elided_values_.clear(); |
| 543 elided_labels_.clear(); | 543 elided_labels_.clear(); |
| 544 | 544 |
| 545 selected_line_ = kNoSelection; | 545 selected_line_ = kNoSelection; |
| 546 } | 546 } |
| 547 | 547 |
| 548 } // namespace autofill | 548 } // namespace autofill |
| OLD | NEW |