| 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/logging.h" | 10 #include "base/logging.h" |
| (...skipping 444 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 455 size_t index) const { | 455 size_t index) const { |
| 456 if (suggestions_[index].frontend_id == POPUP_ITEM_ID_WARNING_MESSAGE) | 456 if (suggestions_[index].frontend_id == POPUP_ITEM_ID_WARNING_MESSAGE) |
| 457 return warning_font_list_; | 457 return warning_font_list_; |
| 458 | 458 |
| 459 if (suggestions_[index].frontend_id == POPUP_ITEM_ID_TITLE) | 459 if (suggestions_[index].frontend_id == POPUP_ITEM_ID_TITLE) |
| 460 return title_font_list_; | 460 return title_font_list_; |
| 461 | 461 |
| 462 return value_font_list_; | 462 return value_font_list_; |
| 463 } | 463 } |
| 464 | 464 |
| 465 #endif |
| 465 const gfx::FontList& AutofillPopupControllerImpl::GetLabelFontList() const { | 466 const gfx::FontList& AutofillPopupControllerImpl::GetLabelFontList() const { |
| 466 return label_font_list_; | 467 return label_font_list_; |
| 467 } | 468 } |
| 468 #endif | |
| 469 | 469 |
| 470 int AutofillPopupControllerImpl::selected_line() const { | 470 int AutofillPopupControllerImpl::selected_line() const { |
| 471 return selected_line_; | 471 return selected_line_; |
| 472 } | 472 } |
| 473 | 473 |
| 474 void AutofillPopupControllerImpl::SetSelectedLine(int selected_line) { | 474 void AutofillPopupControllerImpl::SetSelectedLine(int selected_line) { |
| 475 if (selected_line_ == selected_line) | 475 if (selected_line_ == selected_line) |
| 476 return; | 476 return; |
| 477 | 477 |
| 478 if (selected_line_ != kNoSelection && | 478 if (selected_line_ != kNoSelection && |
| (...skipping 182 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 661 popup_bounds_ = gfx::Rect(); | 661 popup_bounds_ = gfx::Rect(); |
| 662 | 662 |
| 663 suggestions_.clear(); | 663 suggestions_.clear(); |
| 664 elided_values_.clear(); | 664 elided_values_.clear(); |
| 665 elided_labels_.clear(); | 665 elided_labels_.clear(); |
| 666 | 666 |
| 667 selected_line_ = kNoSelection; | 667 selected_line_ = kNoSelection; |
| 668 } | 668 } |
| 669 | 669 |
| 670 } // namespace autofill | 670 } // namespace autofill |
| OLD | NEW |