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 "base/memory/weak_ptr.h" | 10 #include "base/memory/weak_ptr.h" |
(...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
71 virtual void Show() OVERRIDE; | 71 virtual void Show() OVERRIDE; |
72 virtual void Hide() OVERRIDE; | 72 virtual void Hide() OVERRIDE; |
73 virtual void UpdateAccountChooser() OVERRIDE; | 73 virtual void UpdateAccountChooser() OVERRIDE; |
74 virtual void UpdateButtonStrip() OVERRIDE; | 74 virtual void UpdateButtonStrip() OVERRIDE; |
75 virtual void UpdateNotificationArea() OVERRIDE; | 75 virtual void UpdateNotificationArea() OVERRIDE; |
76 virtual void UpdateSection(DialogSection section, | 76 virtual void UpdateSection(DialogSection section, |
77 UserInputAction action) OVERRIDE; | 77 UserInputAction action) OVERRIDE; |
78 virtual void GetUserInput(DialogSection section, | 78 virtual void GetUserInput(DialogSection section, |
79 DetailOutputMap* output) OVERRIDE; | 79 DetailOutputMap* output) OVERRIDE; |
80 virtual string16 GetCvc() OVERRIDE; | 80 virtual string16 GetCvc() OVERRIDE; |
| 81 virtual bool UseBillingForShipping() OVERRIDE; |
81 virtual bool SaveDetailsLocally() OVERRIDE; | 82 virtual bool SaveDetailsLocally() OVERRIDE; |
82 virtual const content::NavigationController* ShowSignIn() OVERRIDE; | 83 virtual const content::NavigationController* ShowSignIn() OVERRIDE; |
83 virtual void HideSignIn() OVERRIDE; | 84 virtual void HideSignIn() OVERRIDE; |
84 virtual void UpdateProgressBar(double value) OVERRIDE; | 85 virtual void UpdateProgressBar(double value) OVERRIDE; |
85 virtual void ModelChanged() OVERRIDE; | 86 virtual void ModelChanged() OVERRIDE; |
86 virtual void SubmitForTesting() OVERRIDE; | 87 virtual void SubmitForTesting() OVERRIDE; |
87 virtual void CancelForTesting() OVERRIDE; | 88 virtual void CancelForTesting() OVERRIDE; |
88 | 89 |
89 // views::DialogDelegate implementation: | 90 // views::DialogDelegate implementation: |
90 virtual string16 GetWindowTitle() const OVERRIDE; | 91 virtual string16 GetWindowTitle() const OVERRIDE; |
(...skipping 201 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
292 class SuggestionView : public views::View { | 293 class SuggestionView : public views::View { |
293 public: | 294 public: |
294 SuggestionView(const string16& edit_label, | 295 SuggestionView(const string16& edit_label, |
295 AutofillDialogViews* autofill_dialog); | 296 AutofillDialogViews* autofill_dialog); |
296 virtual ~SuggestionView(); | 297 virtual ~SuggestionView(); |
297 | 298 |
298 // Whether this section is editable or not. | 299 // Whether this section is editable or not. |
299 void SetEditable(bool editable); | 300 void SetEditable(bool editable); |
300 | 301 |
301 // Sets the display text of the suggestion. | 302 // Sets the display text of the suggestion. |
302 void SetSuggestionText(const string16& text, gfx::Font::FontStyle style); | 303 void SetSuggestionText(const string16& text); |
303 | 304 |
304 // Sets the icon which should be displayed ahead of the text. | 305 // Sets the icon which should be displayed ahead of the text. |
305 void SetSuggestionIcon(const gfx::Image& image); | 306 void SetSuggestionIcon(const gfx::Image& image); |
306 | 307 |
307 // Shows an auxiliary textfield to the right of the suggestion icon and | 308 // Shows an auxiliary textfield to the right of the suggestion icon and |
308 // text. This is currently only used to show a CVC field for the CC section. | 309 // text. This is currently only used to show a CVC field for the CC section. |
309 void ShowTextfield(const string16& placeholder_text, | 310 void ShowTextfield(const string16& placeholder_text, |
310 const gfx::ImageSkia& icon); | 311 const gfx::ImageSkia& icon); |
311 | 312 |
312 DecoratedTextfield* decorated_textfield() { return decorated_; } | 313 DecoratedTextfield* decorated_textfield() { return decorated_; } |
(...skipping 120 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
433 | 434 |
434 // The top-level View for the dialog. Owned by the constrained window. | 435 // The top-level View for the dialog. Owned by the constrained window. |
435 views::View* contents_; | 436 views::View* contents_; |
436 | 437 |
437 // A DialogSection-keyed map of the DetailGroup structs. | 438 // A DialogSection-keyed map of the DetailGroup structs. |
438 DetailGroupMap detail_groups_; | 439 DetailGroupMap detail_groups_; |
439 | 440 |
440 // Somewhere to show notification messages about errors, warnings, or promos. | 441 // Somewhere to show notification messages about errors, warnings, or promos. |
441 NotificationArea* notification_area_; | 442 NotificationArea* notification_area_; |
442 | 443 |
| 444 // The checkbox that controls whether to use the billing details for shipping |
| 445 // as well. |
| 446 views::Checkbox* use_billing_for_shipping_; |
| 447 |
443 // Runs the suggestion menu (triggered by each section's |suggested_button|. | 448 // Runs the suggestion menu (triggered by each section's |suggested_button|. |
444 scoped_ptr<views::MenuRunner> menu_runner_; | 449 scoped_ptr<views::MenuRunner> menu_runner_; |
445 | 450 |
446 // The view that allows the user to toggle the data source. | 451 // The view that allows the user to toggle the data source. |
447 AccountChooser* account_chooser_; | 452 AccountChooser* account_chooser_; |
448 | 453 |
449 // View to host the signin dialog and related controls. | 454 // View to host the signin dialog and related controls. |
450 views::View* sign_in_container_; | 455 views::View* sign_in_container_; |
451 | 456 |
452 // LabelButton displayed during sign-in. Clicking cancels sign-in and returns | 457 // LabelButton displayed during sign-in. Clicking cancels sign-in and returns |
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
485 | 490 |
486 // The focus manager for |window_|. | 491 // The focus manager for |window_|. |
487 views::FocusManager* focus_manager_; | 492 views::FocusManager* focus_manager_; |
488 | 493 |
489 DISALLOW_COPY_AND_ASSIGN(AutofillDialogViews); | 494 DISALLOW_COPY_AND_ASSIGN(AutofillDialogViews); |
490 }; | 495 }; |
491 | 496 |
492 } // namespace autofill | 497 } // namespace autofill |
493 | 498 |
494 #endif // CHROME_BROWSER_UI_VIEWS_AUTOFILL_AUTOFILL_DIALOG_VIEWS_H_ | 499 #endif // CHROME_BROWSER_UI_VIEWS_AUTOFILL_AUTOFILL_DIALOG_VIEWS_H_ |
OLD | NEW |