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

Side by Side Diff: chrome/browser/autofill/autofill_popup_view.h

Issue 10987018: Share Font Code for New Autofill. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Created 8 years, 2 months 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
« no previous file with comments | « no previous file | chrome/browser/autofill/autofill_popup_view.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 #ifndef CHROME_BROWSER_AUTOFILL_AUTOFILL_POPUP_VIEW_H_ 5 #ifndef CHROME_BROWSER_AUTOFILL_AUTOFILL_POPUP_VIEW_H_
6 #define CHROME_BROWSER_AUTOFILL_AUTOFILL_POPUP_VIEW_H_ 6 #define CHROME_BROWSER_AUTOFILL_AUTOFILL_POPUP_VIEW_H_
7 7
8 #include <vector> 8 #include <vector>
9 9
10 #include "base/compiler_specific.h" 10 #include "base/compiler_specific.h"
11 #include "base/string16.h" 11 #include "base/string16.h"
12 #include "content/public/browser/notification_registrar.h" 12 #include "content/public/browser/notification_registrar.h"
13 #include "content/public/browser/notification_observer.h" 13 #include "content/public/browser/notification_observer.h"
14 #include "ui/gfx/font.h"
14 #include "ui/gfx/rect.h" 15 #include "ui/gfx/rect.h"
15 16
16 namespace content { 17 namespace content {
17 class WebContents; 18 class WebContents;
18 } 19 }
19 20
20 class AutofillExternalDelegate; 21 class AutofillExternalDelegate;
21 22
22 class AutofillPopupView : public content::NotificationObserver { 23 class AutofillPopupView : public content::NotificationObserver {
23 public: 24 public:
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after
63 const std::vector<string16>& autofill_labels() const { 64 const std::vector<string16>& autofill_labels() const {
64 return autofill_labels_; 65 return autofill_labels_;
65 } 66 }
66 const std::vector<string16>& autofill_icons() const { 67 const std::vector<string16>& autofill_icons() const {
67 return autofill_icons_; 68 return autofill_icons_;
68 } 69 }
69 const std::vector<int>& autofill_unique_ids() const { 70 const std::vector<int>& autofill_unique_ids() const {
70 return autofill_unique_ids_; 71 return autofill_unique_ids_;
71 } 72 }
72 73
74 const gfx::Font label_font() const { return label_font_; }
tfarina 2012/09/25 16:00:58 return this by const-ref
csharp 2012/09/25 20:08:00 Done.
75 const gfx::Font value_font() const { return value_font_; }
76
73 int selected_line() const { return selected_line_; } 77 int selected_line() const { return selected_line_; }
74 78
75 // Change which line is currently selected by the user. 79 // Change which line is currently selected by the user.
76 void SetSelectedLine(int selected_line); 80 void SetSelectedLine(int selected_line);
77 81
78 // Clear the currently selected line so that nothing is selected. 82 // Clear the currently selected line so that nothing is selected.
79 void ClearSelectedLine(); 83 void ClearSelectedLine();
80 84
81 // Increase the selected line by 1, properly handling wrapping. 85 // Increase the selected line by 1, properly handling wrapping.
82 void SelectNextLine(); 86 void SelectNextLine();
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
116 120
117 // The bounds of the text element that is the focus of the Autofill. 121 // The bounds of the text element that is the focus of the Autofill.
118 gfx::Rect element_bounds_; 122 gfx::Rect element_bounds_;
119 123
120 // The current Autofill query values. 124 // The current Autofill query values.
121 std::vector<string16> autofill_values_; 125 std::vector<string16> autofill_values_;
122 std::vector<string16> autofill_labels_; 126 std::vector<string16> autofill_labels_;
123 std::vector<string16> autofill_icons_; 127 std::vector<string16> autofill_icons_;
124 std::vector<int> autofill_unique_ids_; 128 std::vector<int> autofill_unique_ids_;
125 129
130 // The fonts for the popup text.
131 gfx::Font value_font_;
132 gfx::Font label_font_;
133
126 // The line that is currently selected by the user. 134 // The line that is currently selected by the user.
127 // |kNoSelection| indicates that no line is currently selected. 135 // |kNoSelection| indicates that no line is currently selected.
128 int selected_line_; 136 int selected_line_;
129 }; 137 };
130 138
131 #endif // CHROME_BROWSER_AUTOFILL_AUTOFILL_POPUP_VIEW_H_ 139 #endif // CHROME_BROWSER_AUTOFILL_AUTOFILL_POPUP_VIEW_H_
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/autofill/autofill_popup_view.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698