Chromium Code Reviews| Index: blimp/client/feature/mock_location_provider.h |
| diff --git a/blimp/client/feature/mock_location_provider.h b/blimp/client/feature/mock_location_provider.h |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..ccfd6b790d2c534e033684f51f9e2705055419f4 |
| --- /dev/null |
| +++ b/blimp/client/feature/mock_location_provider.h |
| @@ -0,0 +1,35 @@ |
| +// Copyright 2016 The Chromium Authors. All rights reserved. |
| +// Use of this source code is governed by a BSD-style license that can be |
| +// found in the LICENSE file. |
| + |
| +#ifndef BLIMP_CLIENT_FEATURE_MOCK_LOCATION_PROVIDER_H_ |
| +#define BLIMP_CLIENT_FEATURE_MOCK_LOCATION_PROVIDER_H_ |
| + |
| +#include "device/geolocation/geoposition.h" |
|
Kevin M
2016/08/01 20:51:05
nitty nit, you can use prototypes here
CJ
2016/08/02 00:36:01
What do you mean by prototypes in this context?
|
| +#include "device/geolocation/location_provider.h" |
| +#include "testing/gmock/include/gmock/gmock.h" |
| + |
| +namespace blimp { |
| +namespace client { |
| + |
| +class MockLocationProvider : public device::LocationProvider { |
| + public: |
| + MockLocationProvider(); |
| + ~MockLocationProvider() override; |
| + |
| + MOCK_METHOD1(SetUpdateCallback, |
| + void(const LocationProviderUpdateCallback& callback)); |
| + MOCK_METHOD1(StartProvider, bool(bool high_accuracy)); |
| + MOCK_METHOD0(StopProvider, void()); |
| + MOCK_METHOD1(GetPosition, void(device::Geoposition* position)); |
| + MOCK_METHOD0(RequestRefresh, void()); |
| + MOCK_METHOD0(OnPermissionGranted, void()); |
| + |
| + private: |
| + DISALLOW_COPY_AND_ASSIGN(MockLocationProvider); |
| +}; |
| + |
| +} // namespace client |
| +} // namespace blimp |
| + |
| +#endif // BLIMP_CLIENT_FEATURE_MOCK_LOCATION_PROVIDER_H_ |