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 #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" |
(...skipping 16 matching lines...) Expand all Loading... |
27 class Image; | 27 class Image; |
28 } | 28 } |
29 | 29 |
30 namespace views { | 30 namespace views { |
31 class Checkbox; | 31 class Checkbox; |
32 class Combobox; | 32 class Combobox; |
33 class FocusManager; | 33 class FocusManager; |
34 class ImageButton; | 34 class ImageButton; |
35 class ImageView; | 35 class ImageView; |
36 class Label; | 36 class Label; |
| 37 class Link; |
37 class MenuRunner; | 38 class MenuRunner; |
38 class TextButton; | 39 class TextButton; |
39 class Textfield; | 40 class Textfield; |
40 class WebView; | 41 class WebView; |
41 } | 42 } |
42 | 43 |
43 namespace ui { | 44 namespace ui { |
44 class ComboboxModel; | 45 class ComboboxModel; |
45 class KeyEvent; | 46 class KeyEvent; |
46 } | 47 } |
(...skipping 86 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
133 virtual void PaintChildren(gfx::Canvas* canvas) OVERRIDE; | 134 virtual void PaintChildren(gfx::Canvas* canvas) OVERRIDE; |
134 virtual void OnPaint(gfx::Canvas* canvas) OVERRIDE; | 135 virtual void OnPaint(gfx::Canvas* canvas) OVERRIDE; |
135 | 136 |
136 private: | 137 private: |
137 views::Textfield* textfield_; | 138 views::Textfield* textfield_; |
138 bool invalid_; | 139 bool invalid_; |
139 | 140 |
140 DISALLOW_COPY_AND_ASSIGN(DecoratedTextfield); | 141 DISALLOW_COPY_AND_ASSIGN(DecoratedTextfield); |
141 }; | 142 }; |
142 | 143 |
143 // An area for notifications. Some types of notifications point at stuff. | 144 // An area for notifications. Some notifications point at the account chooser. |
144 class NotificationArea : public views::View { | 145 class NotificationArea : public views::View { |
145 public: | 146 public: |
146 NotificationArea(); | 147 explicit NotificationArea(views::View* arrow_centering_anchor); |
147 virtual ~NotificationArea(); | 148 virtual ~NotificationArea(); |
148 | 149 |
149 void SetNotification(const DialogNotification& notification); | 150 void SetNotification(const DialogNotification& notification); |
150 | 151 |
151 // views::View implementation. | 152 // views::View implementation. |
152 virtual std::string GetClassName() const OVERRIDE; | 153 virtual std::string GetClassName() const OVERRIDE; |
153 virtual void OnPaint(gfx::Canvas* canvas) OVERRIDE; | 154 virtual void OnPaint(gfx::Canvas* canvas) OVERRIDE; |
154 | 155 |
155 private: | 156 private: |
156 views::Label* label_; | 157 views::Label* label_; |
| 158 |
| 159 // If |notification_.HasArrow()| is true, the arrow should point at this. |
| 160 views::View* arrow_centering_anchor_; // weak. |
| 161 |
157 DialogNotification notification_; | 162 DialogNotification notification_; |
158 | 163 |
159 DISALLOW_COPY_AND_ASSIGN(NotificationArea); | 164 DISALLOW_COPY_AND_ASSIGN(NotificationArea); |
160 }; | 165 }; |
161 | 166 |
162 typedef std::map<const DetailInput*, DecoratedTextfield*> TextfieldMap; | 167 typedef std::map<const DetailInput*, DecoratedTextfield*> TextfieldMap; |
163 typedef std::map<const DetailInput*, views::Combobox*> ComboboxMap; | 168 typedef std::map<const DetailInput*, views::Combobox*> ComboboxMap; |
164 | 169 |
165 // A view that packs a label on the left and some related controls | 170 // A view that packs a label on the left and some related controls |
166 // on the right. | 171 // on the right. |
(...skipping 166 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
333 // Somewhere to show notification messages about errors, warnings, or promos. | 338 // Somewhere to show notification messages about errors, warnings, or promos. |
334 NotificationArea* notification_area_; | 339 NotificationArea* notification_area_; |
335 | 340 |
336 // The checkbox that controls whether to use the billing details for shipping | 341 // The checkbox that controls whether to use the billing details for shipping |
337 // as well. | 342 // as well. |
338 views::Checkbox* use_billing_for_shipping_; | 343 views::Checkbox* use_billing_for_shipping_; |
339 | 344 |
340 // Runs the suggestion menu (triggered by each section's |suggested_button|. | 345 // Runs the suggestion menu (triggered by each section's |suggested_button|. |
341 scoped_ptr<views::MenuRunner> menu_runner_; | 346 scoped_ptr<views::MenuRunner> menu_runner_; |
342 | 347 |
343 // The link that initiates the sign in flow. | 348 // A link to allow choosing different accounts to pay with. |
344 views::Link* sign_in_link_; | 349 views::Link* account_chooser_link_; |
345 | 350 |
346 // View to host the signin dialog and related controls. | 351 // View to host the signin dialog and related controls. |
347 views::View* sign_in_container_; | 352 views::View* sign_in_container_; |
348 | 353 |
349 // TextButton displayed during sign-in. Clicking cancels sign-in and returns | 354 // TextButton displayed during sign-in. Clicking cancels sign-in and returns |
350 // to the main flow. | 355 // to the main flow. |
351 views::TextButton* cancel_sign_in_; | 356 views::TextButton* cancel_sign_in_; |
352 | 357 |
353 // A WebView to that navigates to a Google sign-in page to allow the user to | 358 // A WebView to that navigates to a Google sign-in page to allow the user to |
354 // sign-in. | 359 // sign-in. |
(...skipping 17 matching lines...) Expand all Loading... |
372 | 377 |
373 // The focus manager for |window_|. | 378 // The focus manager for |window_|. |
374 views::FocusManager* focus_manager_; | 379 views::FocusManager* focus_manager_; |
375 | 380 |
376 DISALLOW_COPY_AND_ASSIGN(AutofillDialogViews); | 381 DISALLOW_COPY_AND_ASSIGN(AutofillDialogViews); |
377 }; | 382 }; |
378 | 383 |
379 } // namespace autofill | 384 } // namespace autofill |
380 | 385 |
381 #endif // CHROME_BROWSER_UI_VIEWS_AUTOFILL_AUTOFILL_DIALOG_VIEWS_H_ | 386 #endif // CHROME_BROWSER_UI_VIEWS_AUTOFILL_AUTOFILL_DIALOG_VIEWS_H_ |
OLD | NEW |