| OLD | NEW |
| 1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2013 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_MOCK_AUTOFILL_DIALOG_CONTROLLER_H_ | 5 #ifndef CHROME_BROWSER_UI_AUTOFILL_MOCK_AUTOFILL_DIALOG_CONTROLLER_H_ |
| 6 #define CHROME_BROWSER_UI_AUTOFILL_MOCK_AUTOFILL_DIALOG_CONTROLLER_H_ | 6 #define CHROME_BROWSER_UI_AUTOFILL_MOCK_AUTOFILL_DIALOG_CONTROLLER_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 "testing/gmock/include/gmock/gmock.h" | 9 #include "testing/gmock/include/gmock/gmock.h" |
| 10 | 10 |
| 11 namespace autofill { | 11 namespace autofill { |
| 12 | 12 |
| 13 class MockAutofillDialogController : public AutofillDialogController { | 13 class MockAutofillDialogController : public AutofillDialogController { |
| 14 public: | 14 public: |
| 15 MockAutofillDialogController(); | 15 MockAutofillDialogController(); |
| 16 virtual ~MockAutofillDialogController(); | 16 virtual ~MockAutofillDialogController(); |
| 17 | 17 |
| 18 virtual string16 DialogTitle() const OVERRIDE; | 18 virtual string16 DialogTitle() const OVERRIDE; |
| 19 virtual string16 AccountChooserText() const OVERRIDE; | 19 virtual string16 AccountChooserText() const OVERRIDE; |
| 20 virtual string16 SignInLinkText() const OVERRIDE; | 20 virtual string16 SignInLinkText() const OVERRIDE; |
| 21 virtual string16 EditSuggestionText() const OVERRIDE; | 21 virtual string16 EditSuggestionText() const OVERRIDE; |
| 22 virtual string16 CancelButtonText() const OVERRIDE; | 22 virtual string16 CancelButtonText() const OVERRIDE; |
| 23 virtual string16 ConfirmButtonText() const OVERRIDE; | 23 virtual string16 ConfirmButtonText() const OVERRIDE; |
| 24 virtual string16 SaveLocallyText() const OVERRIDE; | 24 virtual string16 SaveLocallyText() const OVERRIDE; |
| 25 virtual string16 LegalDocumentsText() OVERRIDE; | 25 virtual string16 LegalDocumentsText() OVERRIDE; |
| 26 virtual DialogSignedInState SignedInState() const OVERRIDE; | 26 virtual DialogSignedInState SignedInState() const OVERRIDE; |
| 27 virtual bool ShouldShowSpinner() const OVERRIDE; | 27 virtual bool ShouldShowSpinner() const OVERRIDE; |
| 28 virtual bool ShouldOfferToSaveInChrome() const OVERRIDE; | 28 MOCK_CONST_METHOD0(ShouldOfferToSaveInChrome, bool()); |
| 29 MOCK_METHOD0(MenuModelForAccountChooser, ui::MenuModel*()); | 29 MOCK_METHOD0(MenuModelForAccountChooser, ui::MenuModel*()); |
| 30 virtual gfx::Image AccountChooserImage() OVERRIDE; | 30 virtual gfx::Image AccountChooserImage() OVERRIDE; |
| 31 virtual bool ShouldShowProgressBar() const OVERRIDE; | 31 virtual bool ShouldShowProgressBar() const OVERRIDE; |
| 32 virtual int GetDialogButtons() const OVERRIDE; | 32 virtual int GetDialogButtons() const OVERRIDE; |
| 33 virtual bool ShouldShowDetailArea() const OVERRIDE; | 33 virtual bool ShouldShowDetailArea() const OVERRIDE; |
| 34 virtual bool IsDialogButtonEnabled(ui::DialogButton button) const OVERRIDE; | 34 virtual bool IsDialogButtonEnabled(ui::DialogButton button) const OVERRIDE; |
| 35 virtual DialogOverlayState GetDialogOverlay() const OVERRIDE; | 35 virtual DialogOverlayState GetDialogOverlay() const OVERRIDE; |
| 36 virtual const std::vector<ui::Range>& LegalDocumentLinks() OVERRIDE; | 36 virtual const std::vector<ui::Range>& LegalDocumentLinks() OVERRIDE; |
| 37 MOCK_CONST_METHOD1(SectionIsActive, bool(DialogSection)); | 37 MOCK_CONST_METHOD1(SectionIsActive, bool(DialogSection)); |
| 38 MOCK_CONST_METHOD1(RequestedFieldsForSection, | 38 MOCK_CONST_METHOD1(RequestedFieldsForSection, |
| (...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 87 virtual content::WebContents* web_contents() OVERRIDE; | 87 virtual content::WebContents* web_contents() OVERRIDE; |
| 88 private: | 88 private: |
| 89 DetailInputs default_inputs_; | 89 DetailInputs default_inputs_; |
| 90 DetailInputs cc_default_inputs_; // Default inputs for SECTION_CC. | 90 DetailInputs cc_default_inputs_; // Default inputs for SECTION_CC. |
| 91 std::vector<ui::Range> range_; | 91 std::vector<ui::Range> range_; |
| 92 }; | 92 }; |
| 93 | 93 |
| 94 } // namespace autofill | 94 } // namespace autofill |
| 95 | 95 |
| 96 #endif // CHROME_BROWSER_UI_AUTOFILL_MOCK_AUTOFILL_DIALOG_CONTROLLER_H_ | 96 #endif // CHROME_BROWSER_UI_AUTOFILL_MOCK_AUTOFILL_DIALOG_CONTROLLER_H_ |
| OLD | NEW |