Ioana Pandele | 961d0cd | 2019-02-06 12:33:45 | [diff] [blame] | 1 | // Copyright 2019 The Chromium Authors. All rights reserved. |
| 2 | // Use of this source code is governed by a BSD-style license that can be |
| 3 | // found in the LICENSE file. |
| 4 | |
| 5 | #ifndef CHROME_BROWSER_AUTOFILL_MOCK_MANUAL_FILLING_CONTROLLER_H_ |
| 6 | #define CHROME_BROWSER_AUTOFILL_MOCK_MANUAL_FILLING_CONTROLLER_H_ |
| 7 | |
| 8 | #include "chrome/browser/autofill/manual_filling_controller.h" |
| 9 | #include "testing/gmock/include/gmock/gmock.h" |
| 10 | |
| 11 | class MockManualFillingController |
| 12 | : public ManualFillingController, |
| 13 | public base::SupportsWeakPtr<MockManualFillingController> { |
| 14 | public: |
| 15 | MockManualFillingController(); |
| 16 | ~MockManualFillingController() override; |
| 17 | |
| 18 | MOCK_METHOD1(OnAutomaticGenerationStatusChanged, void(bool)); |
| 19 | MOCK_METHOD1(OnFilledIntoFocusedField, void(autofill::FillingStatus)); |
| 20 | MOCK_METHOD2(RefreshSuggestionsForField, |
Jan Wilken Dörrie | 4ebe0cec | 2019-05-23 20:20:44 | [diff] [blame] | 21 | void(autofill::mojom::FocusedFieldType, |
| 22 | const autofill::AccessorySheetData&)); |
Ioana Pandele | 961d0cd | 2019-02-06 12:33:45 | [diff] [blame] | 23 | MOCK_METHOD1(ShowWhenKeyboardIsVisible, |
| 24 | void(ManualFillingController::FillingSource)); |
Jan Wilken Dörrie | d5fa4425 | 2019-05-24 15:43:16 | [diff] [blame] | 25 | MOCK_METHOD0(ShowTouchToFillSheet, void()); |
Ioana Pandele | 961d0cd | 2019-02-06 12:33:45 | [diff] [blame] | 26 | MOCK_METHOD1(Hide, void(ManualFillingController::FillingSource)); |
| 27 | MOCK_METHOD2(GetFavicon, |
| 28 | void(int, base::OnceCallback<void(const gfx::Image&)>)); |
Friedrich Horschig | 8e760543 | 2019-05-29 08:32:11 | [diff] [blame^] | 29 | MOCK_METHOD2(OnFillingTriggered, |
| 30 | void(autofill::AccessoryTabType type, |
| 31 | const autofill::UserInfo::Field&)); |
Friedrich Horschig | b33702c | 2019-05-24 14:56:54 | [diff] [blame] | 32 | MOCK_CONST_METHOD1(OnOptionSelected, |
| 33 | void(autofill::AccessoryAction selected_action)); |
Ioana Pandele | 961d0cd | 2019-02-06 12:33:45 | [diff] [blame] | 34 | MOCK_METHOD0(OnGenerationRequested, void()); |
| 35 | MOCK_CONST_METHOD0(container_view, gfx::NativeView()); |
| 36 | }; |
| 37 | |
| 38 | #endif // CHROME_BROWSER_AUTOFILL_MOCK_MANUAL_FILLING_CONTROLLER_H_ |