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

Side by Side Diff: chrome/browser/ui/autofill/autofill_dialog_controller.h

Issue 12225095: Interactive autofill: Adds footnote view to accept legal documents in the UI. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: sky@ review Created 7 years, 10 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_AUTOFILL_AUTOFILL_DIALOG_CONTROLLER_H_ 5 #ifndef CHROME_BROWSER_UI_AUTOFILL_AUTOFILL_DIALOG_CONTROLLER_H_
6 #define CHROME_BROWSER_UI_AUTOFILL_AUTOFILL_DIALOG_CONTROLLER_H_ 6 #define CHROME_BROWSER_UI_AUTOFILL_AUTOFILL_DIALOG_CONTROLLER_H_
7 7
8 #include <vector> 8 #include <vector>
9 9
10 #include "base/string16.h" 10 #include "base/string16.h"
(...skipping 29 matching lines...) Expand all
40 virtual string16 DialogTitle() const = 0; 40 virtual string16 DialogTitle() const = 0;
41 virtual string16 AccountChooserText() const = 0; 41 virtual string16 AccountChooserText() const = 0;
42 virtual string16 EditSuggestionText() const = 0; 42 virtual string16 EditSuggestionText() const = 0;
43 virtual string16 UseBillingForShippingText() const = 0; 43 virtual string16 UseBillingForShippingText() const = 0;
44 virtual string16 WalletOptionText() const = 0; 44 virtual string16 WalletOptionText() const = 0;
45 virtual string16 CancelButtonText() const = 0; 45 virtual string16 CancelButtonText() const = 0;
46 virtual string16 ConfirmButtonText() const = 0; 46 virtual string16 ConfirmButtonText() const = 0;
47 virtual string16 CancelSignInText() const = 0; 47 virtual string16 CancelSignInText() const = 0;
48 virtual string16 SaveLocallyText() const = 0; 48 virtual string16 SaveLocallyText() const = 0;
49 virtual string16 ProgressBarText() const = 0; 49 virtual string16 ProgressBarText() const = 0;
50 // Even-indexed strings are text between links, odd are the text of links.
51 virtual std::vector<string16> FootnoteLinkParts() const = 0;
52 virtual string16 AcceptFootnoteLinksText() const = 0;
50 53
51 // State --------------------------------------------------------------------- 54 // State ---------------------------------------------------------------------
52 55
53 // Whether the user is known to be signed in. 56 // Whether the account chooser is enabled (clickable).
54 virtual DialogSignedInState SignedInState() const = 0; 57 virtual bool AccountChooserEnabled() const = 0;
55 58
56 // Whether or not Wallet can be used for this transaction. Returns false if 59 // Whether or not Wallet can be used for this transaction. Returns false if
57 // any network/Wallet errors occur while running this dialog. 60 // any network/Wallet errors occur while running this dialog.
58 virtual bool CanPayWithWallet() const = 0; 61 virtual bool CanPayWithWallet() const = 0;
59 62
60 // Whether the account chooser is enabled (clickable). 63 // Returns any dialog notification that should currently be showing.
61 virtual bool AccountChooserEnabled() const = 0; 64 virtual DialogNotification CurrentNotification() const = 0;
65
66 // Whether the user is known to be signed in.
67 virtual DialogSignedInState SignedInState() const = 0;
62 68
63 // Detail inputs ------------------------------------------------------------- 69 // Detail inputs -------------------------------------------------------------
64 70
65 // Returns the set of inputs the page has requested which fall under 71 // Returns the set of inputs the page has requested which fall under
66 // |section|. 72 // |section|.
67 virtual const DetailInputs& RequestedFieldsForSection(DialogSection section) 73 virtual const DetailInputs& RequestedFieldsForSection(DialogSection section)
68 const = 0; 74 const = 0;
69 75
70 // Returns the combobox model for inputs of type |type|, or NULL if the input 76 // Returns the combobox model for inputs of type |type|, or NULL if the input
71 // should be a text field. 77 // should be a text field.
(...skipping 21 matching lines...) Expand all
93 bool was_edit) = 0; 99 bool was_edit) = 0;
94 100
95 // The view forwards keypresses in text inputs. Returns true if there should 101 // The view forwards keypresses in text inputs. Returns true if there should
96 // be no further processing of the event. 102 // be no further processing of the event.
97 virtual bool HandleKeyPressEventInInput( 103 virtual bool HandleKeyPressEventInInput(
98 const content::NativeWebKeyboardEvent& event) = 0; 104 const content::NativeWebKeyboardEvent& event) = 0;
99 105
100 // Called when focus has changed position within the view. 106 // Called when focus has changed position within the view.
101 virtual void FocusMoved() = 0; 107 virtual void FocusMoved() = 0;
102 108
103 // Miscellany ---------------------------------------------------------------- 109 // Actions -------------------------------------------------------------------
104
105 // Called when the view has been closed. The value for |action| indicates
106 // whether the Autofill operation should be aborted.
107 virtual void ViewClosed(DialogAction action) = 0;
108
109 // Returns any dialog notification that should currently be showing.
110 virtual DialogNotification CurrentNotification() const = 0;
111 110
112 // Begins the flow to sign into Wallet. 111 // Begins the flow to sign into Wallet.
113 virtual void StartSignInFlow() = 0; 112 virtual void StartSignInFlow() = 0;
114 113
115 // Marks the signin flow into Wallet complete. 114 // Marks the signin flow into Wallet complete.
116 virtual void EndSignInFlow() = 0; 115 virtual void EndSignInFlow() = 0;
117 116
117 // Accessors -----------------------------------------------------------------
118
118 // Returns the profile for this dialog. 119 // Returns the profile for this dialog.
119 virtual Profile* profile() = 0; 120 virtual Profile* profile() = 0;
120 121
121 // The web contents that prompted the dialog. 122 // The web contents that prompted the dialog.
122 virtual content::WebContents* web_contents() = 0; 123 virtual content::WebContents* web_contents() = 0;
123 124
125 // Event handlers -----------------------------------------------------------
126
127 // |index| is the position of the link that's clicked in the UI. For example:
128 // [ Terms of Service ] [ Terms of Use ] [ Privacy ] -> 0 == terms of service.
129 // NOTE: Privacy policy will always be the last link as it is automatically
130 // appended to the list of links when any legal link needs to be shown.
131 virtual void LegalDocumentLinkClicked(int index) = 0;
132
133 // Called when the view has been closed. The value for |action| indicates
134 // whether the Autofill operation should be aborted.
135 virtual void ViewClosed(DialogAction action) = 0;
136
124 protected: 137 protected:
125 virtual ~AutofillDialogController(); 138 virtual ~AutofillDialogController();
126 }; 139 };
127 140
128 } // namespace autofill 141 } // namespace autofill
129 142
130 #endif // CHROME_BROWSER_UI_AUTOFILL_AUTOFILL_DIALOG_CONTROLLER_H_ 143 #endif // CHROME_BROWSER_UI_AUTOFILL_AUTOFILL_DIALOG_CONTROLLER_H_
OLDNEW
« no previous file with comments | « chrome/browser/autofill/wallet/wallet_items_unittest.cc ('k') | chrome/browser/ui/autofill/autofill_dialog_controller_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698