Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(5)

Side by Side Diff: chrome/browser/ui/autofill/autofill_popup_layout_model.h

Issue 2496683003: Http Bad: Add a PopupItemId to identify http warning message (Closed)
Patch Set: minor change Created 4 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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"
11 #include "chrome/browser/ui/autofill/autofill_popup_view_delegate.h" 11 #include "chrome/browser/ui/autofill/autofill_popup_view_delegate.h"
12 #include "chrome/browser/ui/autofill/popup_view_common.h" 12 #include "chrome/browser/ui/autofill/popup_view_common.h"
13 #include "third_party/skia/include/core/SkColor.h"
13 #include "ui/gfx/font_list.h" 14 #include "ui/gfx/font_list.h"
14 #include "ui/gfx/geometry/rect.h" 15 #include "ui/gfx/geometry/rect.h"
15 #include "ui/gfx/native_widget_types.h" 16 #include "ui/gfx/native_widget_types.h"
16 17
17 namespace gfx { 18 namespace gfx {
18 class Display; 19 class Display;
19 class Point; 20 class Point;
20 } 21 }
21 22
22 namespace ui { 23 namespace ui {
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
60 int GetAvailableWidthForRow(int row, bool with_label) const; 61 int GetAvailableWidthForRow(int row, bool with_label) const;
61 62
62 // Calculates and sets the bounds of the popup, including placing it properly 63 // Calculates and sets the bounds of the popup, including placing it properly
63 // to prevent it from going off the screen. 64 // to prevent it from going off the screen.
64 void UpdatePopupBounds(); 65 void UpdatePopupBounds();
65 66
66 // The same font can vary based on the type of data it is showing at the row 67 // The same font can vary based on the type of data it is showing at the row
67 // |index|. 68 // |index|.
68 const gfx::FontList& GetValueFontListForRow(size_t index) const; 69 const gfx::FontList& GetValueFontListForRow(size_t index) const;
69 const gfx::FontList& GetLabelFontList() const; 70 const gfx::FontList& GetLabelFontList() const;
71
72 // Returns the value font color of the row item according to its |index|.
73 SkColor GetValueFontColorForRow(size_t index) const;
70 #endif 74 #endif
71 75
72 // Convert a y-coordinate to the closest line. 76 // Convert a y-coordinate to the closest line.
73 int LineFromY(int y) const; 77 int LineFromY(int y) const;
74 78
75 const gfx::Rect popup_bounds() const { return popup_bounds_; } 79 const gfx::Rect popup_bounds() const { return popup_bounds_; }
76 80
77 // Returns the bounds of the item at |index| in the popup, relative to 81 // Returns the bounds of the item at |index| in the popup, relative to
78 // the top left of the popup. 82 // the top left of the popup.
79 gfx::Rect GetRowBounds(size_t index) const; 83 gfx::Rect GetRowBounds(size_t index) const;
(...skipping 25 matching lines...) Expand all
105 PopupViewCommon view_common_; 109 PopupViewCommon view_common_;
106 110
107 AutofillPopupViewDelegate* delegate_; // Weak reference. 111 AutofillPopupViewDelegate* delegate_; // Weak reference.
108 112
109 DISALLOW_COPY_AND_ASSIGN(AutofillPopupLayoutModel); 113 DISALLOW_COPY_AND_ASSIGN(AutofillPopupLayoutModel);
110 }; 114 };
111 115
112 } // namespace autofill 116 } // namespace autofill
113 117
114 #endif // CHROME_BROWSER_UI_AUTOFILL_AUTOFILL_POPUP_LAYOUT_MODEL_H_ 118 #endif // CHROME_BROWSER_UI_AUTOFILL_AUTOFILL_POPUP_LAYOUT_MODEL_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698