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 65 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
76 layout_model_(this), | 76 layout_model_(this), |
77 delegate_(delegate), | 77 delegate_(delegate), |
78 weak_ptr_factory_(this) { | 78 weak_ptr_factory_(this) { |
79 ClearState(); | 79 ClearState(); |
80 controller_common_->SetKeyPressCallback( | 80 controller_common_->SetKeyPressCallback( |
81 base::Bind(&AutofillPopupControllerImpl::HandleKeyPressEvent, | 81 base::Bind(&AutofillPopupControllerImpl::HandleKeyPressEvent, |
82 base::Unretained(this))); | 82 base::Unretained(this))); |
83 #if !defined(OS_ANDROID) | 83 #if !defined(OS_ANDROID) |
84 smaller_font_list_ = | 84 smaller_font_list_ = |
85 normal_font_list_.DeriveWithSizeDelta(kSmallerFontSizeDelta); | 85 normal_font_list_.DeriveWithSizeDelta(kSmallerFontSizeDelta); |
86 bold_font_list_ = normal_font_list_.DeriveWithStyle(gfx::Font::BOLD); | 86 bold_font_list_ = normal_font_list_.DeriveWithWeight(gfx::Font::Weight::BOLD); |
87 #if defined(OS_MACOSX) | 87 #if defined(OS_MACOSX) |
88 // There is no italic version of the system font. | 88 // There is no italic version of the system font. |
89 warning_font_list_ = normal_font_list_; | 89 warning_font_list_ = normal_font_list_; |
90 #else | 90 #else |
91 warning_font_list_ = normal_font_list_.DeriveWithStyle(gfx::Font::ITALIC); | 91 warning_font_list_ = normal_font_list_.DeriveWithStyle(gfx::Font::ITALIC); |
92 #endif | 92 #endif |
93 #endif | 93 #endif |
94 } | 94 } |
95 | 95 |
96 AutofillPopupControllerImpl::~AutofillPopupControllerImpl() {} | 96 AutofillPopupControllerImpl::~AutofillPopupControllerImpl() {} |
(...skipping 472 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
569 // Don't clear view_, because otherwise the popup will have to get regenerated | 569 // Don't clear view_, because otherwise the popup will have to get regenerated |
570 // and this will cause flickering. | 570 // and this will cause flickering. |
571 suggestions_.clear(); | 571 suggestions_.clear(); |
572 elided_values_.clear(); | 572 elided_values_.clear(); |
573 elided_labels_.clear(); | 573 elided_labels_.clear(); |
574 | 574 |
575 selected_line_ = kNoSelection; | 575 selected_line_ = kNoSelection; |
576 } | 576 } |
577 | 577 |
578 } // namespace autofill | 578 } // namespace autofill |
OLD | NEW |