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 21 matching lines...) Expand all Loading... |
32 | 32 |
33 // Size difference between name and subtext in pixels. | 33 // Size difference between name and subtext in pixels. |
34 const int kLabelFontSizeDelta = -2; | 34 const int kLabelFontSizeDelta = -2; |
35 | 35 |
36 // The vertical height of each row in pixels. | 36 // The vertical height of each row in pixels. |
37 const size_t kRowHeight = 24; | 37 const size_t kRowHeight = 24; |
38 | 38 |
39 // The vertical height of a separator in pixels. | 39 // The vertical height of a separator in pixels. |
40 const size_t kSeparatorHeight = 1; | 40 const size_t kSeparatorHeight = 1; |
41 | 41 |
42 // The maximum amount of characters to display from either the name or subtext. | |
43 const size_t kMaxTextLength = 15; | |
44 | |
45 #if !defined(OS_ANDROID) | 42 #if !defined(OS_ANDROID) |
46 const size_t kNamePadding = AutofillPopupView::kNamePadding; | 43 const size_t kNamePadding = AutofillPopupView::kNamePadding; |
47 const size_t kIconPadding = AutofillPopupView::kIconPadding; | 44 const size_t kIconPadding = AutofillPopupView::kIconPadding; |
48 const size_t kEndPadding = AutofillPopupView::kEndPadding; | 45 const size_t kEndPadding = AutofillPopupView::kEndPadding; |
49 const size_t kAutofillIconWidth = AutofillPopupView::kAutofillIconWidth; | 46 const size_t kAutofillIconWidth = AutofillPopupView::kAutofillIconWidth; |
50 #endif | 47 #endif |
51 | 48 |
52 struct DataResource { | 49 struct DataResource { |
53 const char* name; | 50 const char* name; |
54 int id; | 51 int id; |
(...skipping 678 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
733 // The popup can appear below the field. | 730 // The popup can appear below the field. |
734 return std::make_pair(bottom_growth_start, popup_required_height); | 731 return std::make_pair(bottom_growth_start, popup_required_height); |
735 } else { | 732 } else { |
736 // The popup must appear above the field. | 733 // The popup must appear above the field. |
737 return std::make_pair(top_growth_end - popup_required_height, | 734 return std::make_pair(top_growth_end - popup_required_height, |
738 popup_required_height); | 735 popup_required_height); |
739 } | 736 } |
740 } | 737 } |
741 | 738 |
742 } // namespace autofill | 739 } // namespace autofill |
OLD | NEW |