OLD | NEW |
1 // Copyright (c) 2016 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2016 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 #ifndef CHROME_BROWSER_UI_AUTOFILL_AUTOFILL_POPUP_LAYOUT_MODEL_H_ | 5 #ifndef CHROME_BROWSER_UI_AUTOFILL_AUTOFILL_POPUP_LAYOUT_MODEL_H_ |
6 #define CHROME_BROWSER_UI_AUTOFILL_AUTOFILL_POPUP_LAYOUT_MODEL_H_ | 6 #define CHROME_BROWSER_UI_AUTOFILL_AUTOFILL_POPUP_LAYOUT_MODEL_H_ |
7 | 7 |
8 #include <stddef.h> | 8 #include <stddef.h> |
9 | 9 |
10 #include "base/strings/string16.h" | 10 #include "base/strings/string16.h" |
(...skipping 20 matching lines...) Expand all Loading... |
31 explicit AutofillPopupLayoutModel(AutofillPopupViewDelegate* delegate); | 31 explicit AutofillPopupLayoutModel(AutofillPopupViewDelegate* delegate); |
32 | 32 |
33 // The minimum amount of padding between the Autofill name and subtext, | 33 // The minimum amount of padding between the Autofill name and subtext, |
34 // in pixels. | 34 // in pixels. |
35 static const int kNamePadding = 15; | 35 static const int kNamePadding = 15; |
36 | 36 |
37 // The amount of padding between icons in pixels. | 37 // The amount of padding between icons in pixels. |
38 static const int kIconPadding = 5; | 38 static const int kIconPadding = 5; |
39 | 39 |
40 // The amount of padding at the end of the popup in pixels. | 40 // The amount of padding at the end of the popup in pixels. |
41 static const int kEndPadding = 3; | 41 static const int kEndPadding = 18; |
42 | 42 |
43 #if !defined(OS_ANDROID) | 43 #if !defined(OS_ANDROID) |
44 // Calculates the desired height of the popup based on its contents. | 44 // Calculates the desired height of the popup based on its contents. |
45 int GetDesiredPopupHeight() const; | 45 int GetDesiredPopupHeight() const; |
46 | 46 |
47 // Calculates the desired width of the popup based on its contents. | 47 // Calculates the desired width of the popup based on its contents. |
48 int GetDesiredPopupWidth() const; | 48 int GetDesiredPopupWidth() const; |
49 | 49 |
50 // Calculate the width of the row, excluding all the text. This provides | 50 // Calculate the width of the row, excluding all the text. This provides |
51 // the size of the row that won't be reducible (since all the text can be | 51 // the size of the row that won't be reducible (since all the text can be |
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
85 PopupViewCommon view_common_; | 85 PopupViewCommon view_common_; |
86 | 86 |
87 AutofillPopupViewDelegate* delegate_; // Weak reference. | 87 AutofillPopupViewDelegate* delegate_; // Weak reference. |
88 | 88 |
89 DISALLOW_COPY_AND_ASSIGN(AutofillPopupLayoutModel); | 89 DISALLOW_COPY_AND_ASSIGN(AutofillPopupLayoutModel); |
90 }; | 90 }; |
91 | 91 |
92 } // namespace autofill | 92 } // namespace autofill |
93 | 93 |
94 #endif // CHROME_BROWSER_UI_AUTOFILL_AUTOFILL_POPUP_LAYOUT_MODEL_H_ | 94 #endif // CHROME_BROWSER_UI_AUTOFILL_AUTOFILL_POPUP_LAYOUT_MODEL_H_ |
OLD | NEW |