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

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

Issue 663643002: requestAutocomplete (desktop): don't get stuck in infinite loop (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix tests Created 6 years, 2 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_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 95 matching lines...) Expand 10 before | Expand all | Expand 10 after
106 virtual base::string16 SpinnerText() const override; 106 virtual base::string16 SpinnerText() const override;
107 virtual base::string16 EditSuggestionText() const override; 107 virtual base::string16 EditSuggestionText() const override;
108 virtual base::string16 CancelButtonText() const override; 108 virtual base::string16 CancelButtonText() const override;
109 virtual base::string16 ConfirmButtonText() const override; 109 virtual base::string16 ConfirmButtonText() const override;
110 virtual base::string16 SaveLocallyText() const override; 110 virtual base::string16 SaveLocallyText() const override;
111 virtual base::string16 SaveLocallyTooltip() const override; 111 virtual base::string16 SaveLocallyTooltip() const override;
112 virtual base::string16 LegalDocumentsText() override; 112 virtual base::string16 LegalDocumentsText() override;
113 virtual bool ShouldShowSpinner() const override; 113 virtual bool ShouldShowSpinner() const override;
114 virtual bool ShouldShowAccountChooser() const override; 114 virtual bool ShouldShowAccountChooser() const override;
115 virtual bool ShouldShowSignInWebView() const override; 115 virtual bool ShouldShowSignInWebView() const override;
116 virtual GURL SignInUrl() const override;
117 virtual bool ShouldOfferToSaveInChrome() const override; 116 virtual bool ShouldOfferToSaveInChrome() const override;
118 virtual bool ShouldSaveInChrome() const override; 117 virtual bool ShouldSaveInChrome() const override;
119 virtual ui::MenuModel* MenuModelForAccountChooser() override; 118 virtual ui::MenuModel* MenuModelForAccountChooser() override;
120 virtual gfx::Image AccountChooserImage() override; 119 virtual gfx::Image AccountChooserImage() override;
121 virtual gfx::Image ButtonStripImage() const override; 120 virtual gfx::Image ButtonStripImage() const override;
122 virtual int GetDialogButtons() const override; 121 virtual int GetDialogButtons() const override;
123 virtual bool IsDialogButtonEnabled(ui::DialogButton button) const override; 122 virtual bool IsDialogButtonEnabled(ui::DialogButton button) const override;
124 virtual DialogOverlayState GetDialogOverlay() override; 123 virtual DialogOverlayState GetDialogOverlay() override;
125 virtual const std::vector<gfx::Range>& LegalDocumentLinks() override; 124 virtual const std::vector<gfx::Range>& LegalDocumentLinks() override;
126 virtual bool SectionIsActive(DialogSection section) const override; 125 virtual bool SectionIsActive(DialogSection section) const override;
(...skipping 193 matching lines...) Expand 10 before | Expand all | Expand 10 after
320 // Allows tests to inspect the state of the account chooser. 319 // Allows tests to inspect the state of the account chooser.
321 AccountChooserModel* AccountChooserModelForTesting(); 320 AccountChooserModel* AccountChooserModelForTesting();
322 321
323 // Returns whether |url| matches the sign in continue URL. If so, also fills 322 // Returns whether |url| matches the sign in continue URL. If so, also fills
324 // in |user_index| with the index of the user account that just signed in. 323 // in |user_index| with the index of the user account that just signed in.
325 virtual bool IsSignInContinueUrl(const GURL& url, size_t* user_index) const; 324 virtual bool IsSignInContinueUrl(const GURL& url, size_t* user_index) const;
326 325
327 // Whether the user is known to be signed in. 326 // Whether the user is known to be signed in.
328 DialogSignedInState SignedInState() const; 327 DialogSignedInState SignedInState() const;
329 328
329 // Tells the view to shows the webpage at |url|. Virtual for testing.
330 virtual void ShowSignIn(const GURL& url);
331
330 private: 332 private:
331 FRIEND_TEST_ALL_PREFIXES(AutofillDialogControllerI18nTest, 333 FRIEND_TEST_ALL_PREFIXES(AutofillDialogControllerI18nTest,
332 CorrectCountryFromInputs); 334 CorrectCountryFromInputs);
333 FRIEND_TEST_ALL_PREFIXES(AutofillDialogControllerTest, 335 FRIEND_TEST_ALL_PREFIXES(AutofillDialogControllerTest,
334 TransactionAmount); 336 TransactionAmount);
335 FRIEND_TEST_ALL_PREFIXES(AutofillDialogControllerTest, 337 FRIEND_TEST_ALL_PREFIXES(AutofillDialogControllerTest,
336 TransactionAmountReadonly); 338 TransactionAmountReadonly);
337 339
338 // Initializes or updates |suggested_cc_| et al. 340 // Initializes or updates |suggested_cc_| et al.
339 void SuggestionsUpdated(); 341 void SuggestionsUpdated();
(...skipping 512 matching lines...) Expand 10 before | Expand all | Expand 10 after
852 base::string16 submitted_cardholder_name_; 854 base::string16 submitted_cardholder_name_;
853 855
854 base::WeakPtrFactory<AutofillDialogControllerImpl> weak_ptr_factory_; 856 base::WeakPtrFactory<AutofillDialogControllerImpl> weak_ptr_factory_;
855 857
856 DISALLOW_COPY_AND_ASSIGN(AutofillDialogControllerImpl); 858 DISALLOW_COPY_AND_ASSIGN(AutofillDialogControllerImpl);
857 }; 859 };
858 860
859 } // namespace autofill 861 } // namespace autofill
860 862
861 #endif // CHROME_BROWSER_UI_AUTOFILL_AUTOFILL_DIALOG_CONTROLLER_IMPL_H_ 863 #endif // CHROME_BROWSER_UI_AUTOFILL_AUTOFILL_DIALOG_CONTROLLER_IMPL_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698