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

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

Issue 14821005: [RFP, Autofill] Switching dialog field identification to int. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 7 years, 7 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
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 "base/memory/weak_ptr.h" 10 #include "base/memory/weak_ptr.h"
(...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after
74 virtual ~AutofillDialogViews(); 74 virtual ~AutofillDialogViews();
75 75
76 // AutofillDialogView implementation: 76 // AutofillDialogView implementation:
77 virtual void Show() OVERRIDE; 77 virtual void Show() OVERRIDE;
78 virtual void Hide() OVERRIDE; 78 virtual void Hide() OVERRIDE;
79 virtual void UpdateAccountChooser() OVERRIDE; 79 virtual void UpdateAccountChooser() OVERRIDE;
80 virtual void UpdateButtonStrip() OVERRIDE; 80 virtual void UpdateButtonStrip() OVERRIDE;
81 virtual void UpdateNotificationArea() OVERRIDE; 81 virtual void UpdateNotificationArea() OVERRIDE;
82 virtual void UpdateSection(DialogSection section) OVERRIDE; 82 virtual void UpdateSection(DialogSection section) OVERRIDE;
83 virtual void FillSection(DialogSection section, 83 virtual void FillSection(DialogSection section,
84 const DetailInput& originating_input) OVERRIDE; 84 AutofillFieldType originating_input) OVERRIDE;
85 virtual void GetUserInput(DialogSection section, 85 virtual void GetUserInput(DialogSection section, DetailOutputMap* output)
86 DetailOutputMap* output) OVERRIDE; 86 OVERRIDE;
87 virtual string16 GetCvc() OVERRIDE; 87 virtual string16 GetCvc() OVERRIDE;
88 virtual bool SaveDetailsLocally() OVERRIDE; 88 virtual bool SaveDetailsLocally() OVERRIDE;
89 virtual const content::NavigationController* ShowSignIn() OVERRIDE; 89 virtual const content::NavigationController* ShowSignIn() OVERRIDE;
90 virtual void HideSignIn() OVERRIDE; 90 virtual void HideSignIn() OVERRIDE;
91 virtual void UpdateProgressBar(double value) OVERRIDE; 91 virtual void UpdateProgressBar(double value) OVERRIDE;
92 virtual void ModelChanged() OVERRIDE; 92 virtual void ModelChanged() OVERRIDE;
93 virtual TestableAutofillDialogView* GetTestableView() OVERRIDE; 93 virtual TestableAutofillDialogView* GetTestableView() OVERRIDE;
94 94
95 // TestableAutofillDialogView implementation: 95 // TestableAutofillDialogView implementation:
96 virtual void SubmitForTesting() OVERRIDE; 96 virtual void SubmitForTesting() OVERRIDE;
97 virtual void CancelForTesting() OVERRIDE; 97 virtual void CancelForTesting() OVERRIDE;
98 virtual string16 GetTextContentsOfInput(const DetailInput& input) OVERRIDE; 98 virtual string16 GetTextContentsOfInput(DialogSection section,
99 virtual void SetTextContentsOfInput(const DetailInput& input, 99 AutofillFieldType type) OVERRIDE;
100 virtual void SetTextContentsOfInput(DialogSection section,
101 AutofillFieldType type,
100 const string16& contents) OVERRIDE; 102 const string16& contents) OVERRIDE;
101 virtual void ActivateInput(const DetailInput& input) OVERRIDE; 103 virtual void ActivateInput(DialogSection section, AutofillFieldType type)
104 OVERRIDE;
102 105
103 // views::DialogDelegate implementation: 106 // views::DialogDelegate implementation:
104 virtual string16 GetWindowTitle() const OVERRIDE; 107 virtual string16 GetWindowTitle() const OVERRIDE;
105 virtual void WindowClosing() OVERRIDE; 108 virtual void WindowClosing() OVERRIDE;
106 virtual void DeleteDelegate() OVERRIDE; 109 virtual void DeleteDelegate() OVERRIDE;
107 virtual views::Widget* GetWidget() OVERRIDE; 110 virtual views::Widget* GetWidget() OVERRIDE;
108 virtual const views::Widget* GetWidget() const OVERRIDE; 111 virtual const views::Widget* GetWidget() const OVERRIDE;
109 virtual views::View* GetContentsView() OVERRIDE; 112 virtual views::View* GetContentsView() OVERRIDE;
110 virtual int GetDialogButtons() const OVERRIDE; 113 virtual int GetDialogButtons() const OVERRIDE;
111 virtual string16 GetDialogButtonLabel(ui::DialogButton button) const OVERRIDE; 114 virtual string16 GetDialogButtonLabel(ui::DialogButton button) const OVERRIDE;
(...skipping 168 matching lines...) Expand 10 before | Expand all | Expand 10 after
280 views::Checkbox* checkbox_; // weak 283 views::Checkbox* checkbox_; // weak
281 284
282 // If HasArrow() is true, the arrow should point at this. 285 // If HasArrow() is true, the arrow should point at this.
283 base::WeakPtr<views::View> arrow_centering_anchor_; 286 base::WeakPtr<views::View> arrow_centering_anchor_;
284 287
285 std::vector<DialogNotification> notifications_; 288 std::vector<DialogNotification> notifications_;
286 289
287 DISALLOW_COPY_AND_ASSIGN(NotificationArea); 290 DISALLOW_COPY_AND_ASSIGN(NotificationArea);
288 }; 291 };
289 292
290 typedef std::map<const DetailInput*, DecoratedTextfield*> TextfieldMap; 293 typedef std::map<AutofillFieldType, DecoratedTextfield*> TextfieldMap;
291 typedef std::map<const DetailInput*, views::Combobox*> ComboboxMap; 294 typedef std::map<AutofillFieldType, views::Combobox*> ComboboxMap;
292 295
293 // A view that packs a label on the left and some related controls 296 // A view that packs a label on the left and some related controls
294 // on the right. 297 // on the right.
295 class SectionContainer : public views::View { 298 class SectionContainer : public views::View {
296 public: 299 public:
297 SectionContainer(const string16& label, 300 SectionContainer(const string16& label,
298 views::View* controls, 301 views::View* controls,
299 views::Button* proxy_button); 302 views::Button* proxy_button);
300 virtual ~SectionContainer(); 303 virtual ~SectionContainer();
301 304
(...skipping 159 matching lines...) Expand 10 before | Expand all | Expand 10 after
461 464
462 // When an input textfield is edited (its contents change) or activated 465 // When an input textfield is edited (its contents change) or activated
463 // (clicked while focused), this function will inform the controller that it's 466 // (clicked while focused), this function will inform the controller that it's
464 // time to show a suggestion popup and possibly reset the validity state of 467 // time to show a suggestion popup and possibly reset the validity state of
465 // the input. 468 // the input.
466 void TextfieldEditedOrActivated(views::Textfield* textfield, bool was_edit); 469 void TextfieldEditedOrActivated(views::Textfield* textfield, bool was_edit);
467 470
468 // Call this when the size of anything in |contents_| might've changed. 471 // Call this when the size of anything in |contents_| might've changed.
469 void ContentsPreferredSizeChanged(); 472 void ContentsPreferredSizeChanged();
470 473
471 // Gets the textfield view that is shown for the given DetailInput model, or 474 // Gets the textfield view that is identified by |section| and |type|, or
472 // NULL. 475 // NULL.
473 views::Textfield* TextfieldForInput(const DetailInput& input); 476 views::Textfield* TextfieldForInput(DialogSection section,
477 AutofillFieldType type);
474 478
475 // Gets the combobox view that is shown for the given DetailInput model, or 479 // Gets the combobox view that is identified by |section| and |type|, or
476 // NULL. 480 // NULL.
477 views::Combobox* ComboboxForInput(const DetailInput& input); 481 views::Combobox* ComboboxForInput(DialogSection section,
482 AutofillFieldType type);
478 483
479 // The controller that drives this view. Weak pointer, always non-NULL. 484 // The controller that drives this view. Weak pointer, always non-NULL.
480 AutofillDialogController* const controller_; 485 AutofillDialogController* const controller_;
481 486
482 // The window that displays |contents_|. Weak pointer; may be NULL when the 487 // The window that displays |contents_|. Weak pointer; may be NULL when the
483 // dialog is closing. 488 // dialog is closing.
484 views::Widget* window_; 489 views::Widget* window_;
485 490
486 // The top-level View for the dialog. Owned by the constrained window. 491 // The top-level View for the dialog. Owned by the constrained window.
487 views::View* contents_; 492 views::View* contents_;
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after
542 views::FocusManager* focus_manager_; 547 views::FocusManager* focus_manager_;
543 548
544 ScopedObserver<views::Widget, AutofillDialogViews> observer_; 549 ScopedObserver<views::Widget, AutofillDialogViews> observer_;
545 550
546 DISALLOW_COPY_AND_ASSIGN(AutofillDialogViews); 551 DISALLOW_COPY_AND_ASSIGN(AutofillDialogViews);
547 }; 552 };
548 553
549 } // namespace autofill 554 } // namespace autofill
550 555
551 #endif // CHROME_BROWSER_UI_VIEWS_AUTOFILL_AUTOFILL_DIALOG_VIEWS_H_ 556 #endif // CHROME_BROWSER_UI_VIEWS_AUTOFILL_AUTOFILL_DIALOG_VIEWS_H_
OLDNEW
« no previous file with comments | « chrome/browser/ui/autofill/testable_autofill_dialog_view.h ('k') | chrome/browser/ui/views/autofill/autofill_dialog_views.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698