1 // Copyright 2017 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 DEVICE_FIDO_MOCK_FIDO_DISCOVERY_OBSERVER_H_ 6 #define DEVICE_FIDO_MOCK_FIDO_DISCOVERY_OBSERVER_H_ 7 8 #include <string> 9 #include <vector> 10 11 #include "base/component_export.h" 12 #include "base/macros.h" 13 #include "device/fido/fido_device_discovery.h" 14 #include "testing/gmock/include/gmock/gmock.h" 15 16 namespace device { 17 18 class FidoAuthenticator; 19 20 class MockFidoDiscoveryObserver : public FidoDiscoveryBase::Observer { 21 public: 22 MockFidoDiscoveryObserver(); 23 ~MockFidoDiscoveryObserver() override; 24 25 MOCK_METHOD3(DiscoveryStarted, 26 void(FidoDiscoveryBase*, bool, std::vector<FidoAuthenticator*>)); 27 MOCK_METHOD2(DiscoveryStopped, void(FidoDiscoveryBase*, bool)); 28 MOCK_METHOD2(AuthenticatorAdded, 29 void(FidoDiscoveryBase*, FidoAuthenticator*)); 30 MOCK_METHOD2(AuthenticatorRemoved, 31 void(FidoDiscoveryBase*, FidoAuthenticator*)); 32 MOCK_METHOD3(AuthenticatorIdChanged, 33 void(FidoDiscoveryBase*, const std::string&, std::string)); 34 MOCK_METHOD3(AuthenticatorPairingModeChanged, 35 void(FidoDiscoveryBase*, const std::string&, bool)); 36 37 private: 38 DISALLOW_COPY_AND_ASSIGN(MockFidoDiscoveryObserver); 39 }; 40 41 } // namespace device 42 43 #endif // DEVICE_FIDO_MOCK_FIDO_DISCOVERY_OBSERVER_H_ 44