| 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->IsCreditCardPopup()), |
| 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 452 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 536 // Don't clear view_, because otherwise the popup will have to get regenerated | 536 // Don't clear view_, because otherwise the popup will have to get regenerated |
| 537 // and this will cause flickering. | 537 // and this will cause flickering. |
| 538 suggestions_.clear(); | 538 suggestions_.clear(); |
| 539 elided_values_.clear(); | 539 elided_values_.clear(); |
| 540 elided_labels_.clear(); | 540 elided_labels_.clear(); |
| 541 | 541 |
| 542 selected_line_ = kNoSelection; | 542 selected_line_ = kNoSelection; |
| 543 } | 543 } |
| 544 | 544 |
| 545 } // namespace autofill | 545 } // namespace autofill |
| OLD | NEW |