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

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

Issue 23806002: [rAc] Disable sign-in link while the user's signed-in state is unknown. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase Created 7 years, 3 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
« no previous file with comments | « no previous file | chrome/browser/ui/autofill/autofill_dialog_controller_impl.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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_IMPL_H_ 5 #ifndef CHROME_BROWSER_UI_AUTOFILL_AUTOFILL_DIALOG_CONTROLLER_IMPL_H_
6 #define CHROME_BROWSER_UI_AUTOFILL_AUTOFILL_DIALOG_CONTROLLER_IMPL_H_ 6 #define CHROME_BROWSER_UI_AUTOFILL_AUTOFILL_DIALOG_CONTROLLER_IMPL_H_
7 7
8 #include <set> 8 #include <set>
9 #include <vector> 9 #include <vector>
10 10
(...skipping 91 matching lines...) Expand 10 before | Expand all | Expand 10 after
102 // AutofillDialogViewDelegate implementation. 102 // AutofillDialogViewDelegate implementation.
103 virtual string16 DialogTitle() const OVERRIDE; 103 virtual string16 DialogTitle() const OVERRIDE;
104 virtual string16 AccountChooserText() const OVERRIDE; 104 virtual string16 AccountChooserText() const OVERRIDE;
105 virtual string16 SignInLinkText() const OVERRIDE; 105 virtual string16 SignInLinkText() const OVERRIDE;
106 virtual string16 EditSuggestionText() const OVERRIDE; 106 virtual string16 EditSuggestionText() const OVERRIDE;
107 virtual string16 CancelButtonText() const OVERRIDE; 107 virtual string16 CancelButtonText() const OVERRIDE;
108 virtual string16 ConfirmButtonText() const OVERRIDE; 108 virtual string16 ConfirmButtonText() const OVERRIDE;
109 virtual string16 SaveLocallyText() const OVERRIDE; 109 virtual string16 SaveLocallyText() const OVERRIDE;
110 virtual string16 SaveLocallyTooltip() const OVERRIDE; 110 virtual string16 SaveLocallyTooltip() const OVERRIDE;
111 virtual string16 LegalDocumentsText() OVERRIDE; 111 virtual string16 LegalDocumentsText() OVERRIDE;
112 virtual DialogSignedInState SignedInState() const OVERRIDE; 112 virtual bool ShouldDisableSignInLink() const OVERRIDE;
113 virtual bool ShouldShowSpinner() const OVERRIDE; 113 virtual bool ShouldShowSpinner() const OVERRIDE;
114 virtual bool ShouldOfferToSaveInChrome() const OVERRIDE; 114 virtual bool ShouldOfferToSaveInChrome() const OVERRIDE;
115 virtual ui::MenuModel* MenuModelForAccountChooser() OVERRIDE; 115 virtual ui::MenuModel* MenuModelForAccountChooser() OVERRIDE;
116 virtual gfx::Image AccountChooserImage() OVERRIDE; 116 virtual gfx::Image AccountChooserImage() OVERRIDE;
117 virtual gfx::Image ButtonStripImage() const OVERRIDE; 117 virtual gfx::Image ButtonStripImage() const OVERRIDE;
118 virtual int GetDialogButtons() const OVERRIDE; 118 virtual int GetDialogButtons() const OVERRIDE;
119 virtual bool IsDialogButtonEnabled(ui::DialogButton button) const OVERRIDE; 119 virtual bool IsDialogButtonEnabled(ui::DialogButton button) const OVERRIDE;
120 virtual DialogOverlayState GetDialogOverlay() const OVERRIDE; 120 virtual DialogOverlayState GetDialogOverlay() const OVERRIDE;
121 virtual const std::vector<ui::Range>& LegalDocumentLinks() OVERRIDE; 121 virtual const std::vector<ui::Range>& LegalDocumentLinks() OVERRIDE;
122 virtual bool SectionIsActive(DialogSection section) const OVERRIDE; 122 virtual bool SectionIsActive(DialogSection section) const OVERRIDE;
(...skipping 153 matching lines...) Expand 10 before | Expand all | Expand 10 after
276 // to the requesting site. 276 // to the requesting site.
277 virtual bool TransmissionWillBeSecure() const; 277 virtual bool TransmissionWillBeSecure() const;
278 278
279 // Shows a new credit card saved bubble and passes ownership of |new_card| and 279 // Shows a new credit card saved bubble and passes ownership of |new_card| and
280 // |billing_profile| to the bubble. Exposed for testing. 280 // |billing_profile| to the bubble. Exposed for testing.
281 virtual void ShowNewCreditCardBubble( 281 virtual void ShowNewCreditCardBubble(
282 scoped_ptr<CreditCard> new_card, 282 scoped_ptr<CreditCard> new_card,
283 scoped_ptr<AutofillProfile> billing_profile); 283 scoped_ptr<AutofillProfile> billing_profile);
284 284
285 private: 285 private:
286 enum DialogSignedInState {
287 REQUIRES_RESPONSE,
288 REQUIRES_SIGN_IN,
289 REQUIRES_PASSIVE_SIGN_IN,
290 SIGNED_IN,
291 SIGN_IN_DISABLED,
292 };
293
286 // Whether or not the current request wants credit info back. 294 // Whether or not the current request wants credit info back.
287 bool RequestingCreditCardInfo() const; 295 bool RequestingCreditCardInfo() const;
288 296
289 // Initializes or updates |suggested_email_| et al. 297 // Initializes or updates |suggested_email_| et al.
290 void SuggestionsUpdated(); 298 void SuggestionsUpdated();
291 299
292 // Whether the user's wallet items have at least one address and instrument. 300 // Whether the user's wallet items have at least one address and instrument.
293 bool HasCompleteWallet() const; 301 bool HasCompleteWallet() const;
294 302
295 // Starts fetching the wallet items from Online Wallet. 303 // Starts fetching the wallet items from Online Wallet.
296 void GetWalletItems(); 304 void GetWalletItems();
297 305
298 // Stop showing sign in flow. 306 // Stop showing sign in flow.
299 void HideSignIn(); 307 void HideSignIn();
300 308
309 // Whether the user is known to be signed in.
310 DialogSignedInState SignedInState() const;
311
301 // Handles the SignedInState() on Wallet or sign-in state update. 312 // Handles the SignedInState() on Wallet or sign-in state update.
302 // Triggers the user name fetch and passive sign-in. 313 // Triggers the user name fetch and passive sign-in.
303 void SignedInStateUpdated(); 314 void SignedInStateUpdated();
304 315
305 // Refreshes the model on Wallet or sign-in state update. 316 // Refreshes the model on Wallet or sign-in state update.
306 void OnWalletOrSigninUpdate(); 317 void OnWalletOrSigninUpdate();
307 318
308 // Called when a Save or Update call to Wallet has validation errors. 319 // Called when a Save or Update call to Wallet has validation errors.
309 void OnWalletFormFieldError( 320 void OnWalletFormFieldError(
310 const std::vector<wallet::FormFieldError>& form_field_errors); 321 const std::vector<wallet::FormFieldError>& form_field_errors);
(...skipping 373 matching lines...) Expand 10 before | Expand all | Expand 10 after
684 // show a bubble as the dialog closes to confirm a user's new card info was 695 // show a bubble as the dialog closes to confirm a user's new card info was
685 // saved. Never populated while incognito (as nothing's actually saved). 696 // saved. Never populated while incognito (as nothing's actually saved).
686 scoped_ptr<CreditCard> newly_saved_card_; 697 scoped_ptr<CreditCard> newly_saved_card_;
687 698
688 DISALLOW_COPY_AND_ASSIGN(AutofillDialogControllerImpl); 699 DISALLOW_COPY_AND_ASSIGN(AutofillDialogControllerImpl);
689 }; 700 };
690 701
691 } // namespace autofill 702 } // namespace autofill
692 703
693 #endif // CHROME_BROWSER_UI_AUTOFILL_AUTOFILL_DIALOG_CONTROLLER_IMPL_H_ 704 #endif // CHROME_BROWSER_UI_AUTOFILL_AUTOFILL_DIALOG_CONTROLLER_IMPL_H_
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/ui/autofill/autofill_dialog_controller_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698