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 92 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
103 view_(NULL), | 103 view_(NULL), |
104 delegate_(delegate), | 104 delegate_(delegate), |
105 text_direction_(text_direction), | 105 text_direction_(text_direction), |
106 hide_on_outside_click_(false), | 106 hide_on_outside_click_(false), |
107 weak_ptr_factory_(this) { | 107 weak_ptr_factory_(this) { |
108 ClearState(); | 108 ClearState(); |
109 controller_common_->SetKeyPressCallback( | 109 controller_common_->SetKeyPressCallback( |
110 base::Bind(&AutofillPopupControllerImpl::HandleKeyPressEvent, | 110 base::Bind(&AutofillPopupControllerImpl::HandleKeyPressEvent, |
111 base::Unretained(this))); | 111 base::Unretained(this))); |
112 #if !defined(OS_ANDROID) | 112 #if !defined(OS_ANDROID) |
113 subtext_font_list_ = name_font_list_.DeriveFontListWithSizeDelta( | 113 subtext_font_list_ = name_font_list_.DeriveWithSizeDelta(kLabelFontSizeDelta); |
114 kLabelFontSizeDelta); | |
115 #if defined(OS_MACOSX) | 114 #if defined(OS_MACOSX) |
116 // There is no italic version of the system font. | 115 // There is no italic version of the system font. |
117 warning_font_list_ = name_font_list_; | 116 warning_font_list_ = name_font_list_; |
118 #else | 117 #else |
119 warning_font_list_ = name_font_list_.DeriveFontListWithSizeDeltaAndStyle( | 118 warning_font_list_ = name_font_list_.DeriveWithStyle(gfx::Font::ITALIC); |
120 0, gfx::Font::ITALIC); | |
121 #endif | 119 #endif |
122 #endif | 120 #endif |
123 } | 121 } |
124 | 122 |
125 AutofillPopupControllerImpl::~AutofillPopupControllerImpl() {} | 123 AutofillPopupControllerImpl::~AutofillPopupControllerImpl() {} |
126 | 124 |
127 void AutofillPopupControllerImpl::Show( | 125 void AutofillPopupControllerImpl::Show( |
128 const std::vector<base::string16>& names, | 126 const std::vector<base::string16>& names, |
129 const std::vector<base::string16>& subtexts, | 127 const std::vector<base::string16>& subtexts, |
130 const std::vector<base::string16>& icons, | 128 const std::vector<base::string16>& icons, |
(...skipping 524 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
655 names_.clear(); | 653 names_.clear(); |
656 subtexts_.clear(); | 654 subtexts_.clear(); |
657 icons_.clear(); | 655 icons_.clear(); |
658 identifiers_.clear(); | 656 identifiers_.clear(); |
659 full_names_.clear(); | 657 full_names_.clear(); |
660 | 658 |
661 selected_line_ = kNoSelection; | 659 selected_line_ = kNoSelection; |
662 } | 660 } |
663 | 661 |
664 } // namespace autofill | 662 } // namespace autofill |
OLD | NEW |