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

Side by Side Diff: chrome/browser/ui/views/autofill/autofill_dialog_views.h

Issue 12052059: requestAutocomplete - more elaborate suggestion labels (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: isherman review Created 7 years, 11 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 | Annotate | Revision Log
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_UI_VIEWS_AUTOFILL_AUTOFILL_DIALOG_VIEWS_H_ 5 #ifndef CHROME_BROWSER_UI_VIEWS_AUTOFILL_AUTOFILL_DIALOG_VIEWS_H_
6 #define CHROME_BROWSER_UI_VIEWS_AUTOFILL_AUTOFILL_DIALOG_VIEWS_H_ 6 #define CHROME_BROWSER_UI_VIEWS_AUTOFILL_AUTOFILL_DIALOG_VIEWS_H_
7 7
8 #include <map> 8 #include <map>
9 9
10 #include "chrome/browser/ui/autofill/autofill_dialog_controller.h" 10 #include "chrome/browser/ui/autofill/autofill_dialog_controller.h"
11 #include "chrome/browser/ui/autofill/autofill_dialog_view.h" 11 #include "chrome/browser/ui/autofill/autofill_dialog_view.h"
12 #include "ui/views/controls/button/button.h" 12 #include "ui/views/controls/button/button.h"
13 #include "ui/views/controls/button/menu_button_listener.h" 13 #include "ui/views/controls/button/menu_button_listener.h"
14 #include "ui/views/controls/link_listener.h" 14 #include "ui/views/controls/link_listener.h"
15 #include "ui/views/controls/textfield/textfield_controller.h" 15 #include "ui/views/controls/textfield/textfield_controller.h"
16 #include "ui/views/focus/focus_manager.h" 16 #include "ui/views/focus/focus_manager.h"
17 #include "ui/views/window/dialog_delegate.h" 17 #include "ui/views/window/dialog_delegate.h"
18 18
19 class ConstrainedWindowViews; 19 class ConstrainedWindowViews;
20 20
21 namespace content { 21 namespace content {
22 class KeyboardListener; 22 class KeyboardListener;
23 } 23 }
24 24
25 namespace gfx {
26 class Image;
27 }
28
25 namespace views { 29 namespace views {
26 class Checkbox; 30 class Checkbox;
27 class Combobox; 31 class Combobox;
28 class FocusManager; 32 class FocusManager;
29 class ImageButton; 33 class ImageButton;
34 class ImageView;
30 class Label; 35 class Label;
31 class MenuRunner; 36 class MenuRunner;
32 class TextButton; 37 class TextButton;
33 class Textfield; 38 class Textfield;
34 class WebView; 39 class WebView;
35 } 40 }
36 41
37 namespace ui { 42 namespace ui {
38 class ComboboxModel; 43 class ComboboxModel;
39 class KeyEvent; 44 class KeyEvent;
(...skipping 124 matching lines...) Expand 10 before | Expand all | Expand 10 after
164 }; 169 };
165 170
166 // A view that contains a suggestion (such as a known address) and a link to 171 // A view that contains a suggestion (such as a known address) and a link to
167 // edit the suggestion. 172 // edit the suggestion.
168 class SuggestionView : public views::View { 173 class SuggestionView : public views::View {
169 public: 174 public:
170 SuggestionView(const string16& edit_label, 175 SuggestionView(const string16& edit_label,
171 views::LinkListener* edit_listener); 176 views::LinkListener* edit_listener);
172 virtual ~SuggestionView(); 177 virtual ~SuggestionView();
173 178
174 // Sets the display text of the suggestion. TODO(estade): this needs to 179 // Sets the display text of the suggestion.
175 // support credit card icons as well.
176 void SetSuggestionText(const string16& text); 180 void SetSuggestionText(const string16& text);
177 181
182 // Sets the icon which should be displayed ahead of the text.
183 void SetSuggestionIcon(const gfx::Image& image);
184
178 private: 185 private:
179 // The label that holds the suggestion description text. 186 // The label that holds the suggestion description text.
180 views::Label* label_; 187 views::Label* label_;
188 // The icon that comes just before |label_|.
189 views::ImageView* icon_;
190 // A view to contain |label_| and |icon_|.
191 views::View* label_container_;
181 192
182 DISALLOW_COPY_AND_ASSIGN(SuggestionView); 193 DISALLOW_COPY_AND_ASSIGN(SuggestionView);
183 }; 194 };
184 195
185 // A convenience struct for holding pointers to views within each detail 196 // A convenience struct for holding pointers to views within each detail
186 // section. None of the member pointers are owned. 197 // section. None of the member pointers are owned.
187 struct DetailsGroup { 198 struct DetailsGroup {
188 explicit DetailsGroup(DialogSection section); 199 explicit DetailsGroup(DialogSection section);
189 ~DetailsGroup(); 200 ~DetailsGroup();
190 201
(...skipping 120 matching lines...) Expand 10 before | Expand all | Expand 10 after
311 322
312 // The focus manager for |window_|. 323 // The focus manager for |window_|.
313 views::FocusManager* focus_manager_; 324 views::FocusManager* focus_manager_;
314 325
315 DISALLOW_COPY_AND_ASSIGN(AutofillDialogViews); 326 DISALLOW_COPY_AND_ASSIGN(AutofillDialogViews);
316 }; 327 };
317 328
318 } // namespace autofill 329 } // namespace autofill
319 330
320 #endif // CHROME_BROWSER_UI_VIEWS_AUTOFILL_AUTOFILL_DIALOG_VIEWS_H_ 331 #endif // CHROME_BROWSER_UI_VIEWS_AUTOFILL_AUTOFILL_DIALOG_VIEWS_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698