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

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

Issue 11428071: support CC expiration dates in imperative autocomplete dialog. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: review Created 8 years 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 "chrome/browser/ui/autofill/autofill_dialog_controller.h" 8 #include "chrome/browser/ui/autofill/autofill_dialog_controller.h"
9 #include "chrome/browser/ui/autofill/autofill_dialog_view.h" 9 #include "chrome/browser/ui/autofill/autofill_dialog_view.h"
10 #include "ui/views/controls/button/button.h" 10 #include "ui/views/controls/button/button.h"
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after
45 45
46 // views::DialogDelegate implementation: 46 // views::DialogDelegate implementation:
47 virtual string16 GetWindowTitle() const OVERRIDE; 47 virtual string16 GetWindowTitle() const OVERRIDE;
48 virtual void DeleteDelegate() OVERRIDE; 48 virtual void DeleteDelegate() OVERRIDE;
49 virtual views::Widget* GetWidget() OVERRIDE; 49 virtual views::Widget* GetWidget() OVERRIDE;
50 virtual const views::Widget* GetWidget() const OVERRIDE; 50 virtual const views::Widget* GetWidget() const OVERRIDE;
51 virtual views::View* GetContentsView() OVERRIDE; 51 virtual views::View* GetContentsView() OVERRIDE;
52 virtual string16 GetDialogButtonLabel(ui::DialogButton button) const OVERRIDE; 52 virtual string16 GetDialogButtonLabel(ui::DialogButton button) const OVERRIDE;
53 virtual bool IsDialogButtonEnabled(ui::DialogButton button) const OVERRIDE; 53 virtual bool IsDialogButtonEnabled(ui::DialogButton button) const OVERRIDE;
54 virtual bool UseChromeStyle() const OVERRIDE; 54 virtual bool UseChromeStyle() const OVERRIDE;
55 virtual ui::ModalType GetModalType() const OVERRIDE;
56 virtual bool Cancel() OVERRIDE; 55 virtual bool Cancel() OVERRIDE;
57 virtual bool Accept() OVERRIDE; 56 virtual bool Accept() OVERRIDE;
58 57
59 // views::ButtonListener implementation: 58 // views::ButtonListener implementation:
60 virtual void ButtonPressed(views::Button* sender, 59 virtual void ButtonPressed(views::Button* sender,
61 const ui::Event& event) OVERRIDE; 60 const ui::Event& event) OVERRIDE;
62 61
63 // views::ComboboxListener implementation: 62 // views::ComboboxListener implementation:
64 virtual void OnSelectedIndexChanged(views::Combobox* combobox) OVERRIDE; 63 virtual void OnSelectedIndexChanged(views::Combobox* combobox) OVERRIDE;
65 64
66 private: 65 private:
67 typedef std::map<const DetailInput*, views::Textfield*> TextfieldMap; 66 typedef std::map<const DetailInput*, views::Textfield*> TextfieldMap;
67 typedef std::map<const DetailInput*, views::Combobox*> ComboboxMap;
68 68
69 // A convenience struct for holding pointers to views within each detail 69 // A convenience struct for holding pointers to views within each detail
70 // section. None of the member pointers are owned. 70 // section. None of the member pointers are owned.
71 struct DetailsGroup { 71 struct DetailsGroup {
72 DetailsGroup(); 72 DetailsGroup();
73 ~DetailsGroup(); 73 ~DetailsGroup();
74 74
75 // The view that contains the entire section (label + input). 75 // The view that contains the entire section (label + input).
76 views::View* container; 76 views::View* container;
77 // The combobox that holds suggested values. 77 // The combobox that holds suggested values.
78 views::Combobox* suggested_input; 78 views::Combobox* suggested_input;
79 // The view that allows manual input. 79 // The view that allows manual input.
80 views::View* manual_input; 80 views::View* manual_input;
81 // The textfields in |manual_input|, tracked by their DetailInput. 81 // The textfields in |manual_input|, tracked by their DetailInput.
82 TextfieldMap textfields; 82 TextfieldMap textfields;
83 // The comboboxes in |manual_input|, tracked by their DetailInput.
84 ComboboxMap comboboxes;
83 }; 85 };
84 86
85 void InitChildViews(); 87 void InitChildViews();
86 88
87 // Creates and returns a view that holds all detail sections. 89 // Creates and returns a view that holds all detail sections.
88 views::View* CreateDetailsContainer(); 90 views::View* CreateDetailsContainer();
89 91
90 // Creates a detail section (Shipping, Email, etc.) with the given label, 92 // Creates a detail section (Shipping, Email, etc.) with the given label,
91 // inputs View, and suggestion model. Relevant pointers are stored in |group|. 93 // inputs View, and suggestion model. Relevant pointers are stored in |group|.
92 void CreateDetailsSection(DialogSection section); 94 void CreateDetailsSection(DialogSection section);
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after
134 // The checkbox that controls whether to use the billing details for shipping 136 // The checkbox that controls whether to use the billing details for shipping
135 // as well. 137 // as well.
136 views::Checkbox* use_billing_for_shipping_; 138 views::Checkbox* use_billing_for_shipping_;
137 139
138 DISALLOW_COPY_AND_ASSIGN(AutofillDialogViews); 140 DISALLOW_COPY_AND_ASSIGN(AutofillDialogViews);
139 }; 141 };
140 142
141 } // namespace autofill 143 } // namespace autofill
142 144
143 #endif // CHROME_BROWSER_UI_VIEWS_AUTOFILL_AUTOFILL_DIALOG_VIEWS_H_ 145 #endif // CHROME_BROWSER_UI_VIEWS_AUTOFILL_AUTOFILL_DIALOG_VIEWS_H_
OLDNEW
« no previous file with comments | « chrome/browser/ui/autofill/autofill_dialog_controller.cc ('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