| OLD | NEW |
| (Empty) |
| 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 | |
| 3 // found in the LICENSE file. | |
| 4 | |
| 5 #ifndef CONTENT_TEST_MOCK_GEOLOCATION_H_ | |
| 6 #define CONTENT_TEST_MOCK_GEOLOCATION_H_ | |
| 7 #pragma once | |
| 8 | |
| 9 #include "base/basictypes.h" | |
| 10 #include "base/memory/ref_counted.h" | |
| 11 | |
| 12 class GeolocationArbitratorDependencyFactory; | |
| 13 | |
| 14 namespace content { | |
| 15 | |
| 16 // Creates a mock location provider that gives a valid location. | |
| 17 class MockGeolocation { | |
| 18 public: | |
| 19 MockGeolocation(); | |
| 20 ~MockGeolocation(); | |
| 21 | |
| 22 // Call this in the test's Setup function. | |
| 23 void Setup(); | |
| 24 | |
| 25 // Call this in the test's TearDown function. | |
| 26 void TearDown(); | |
| 27 | |
| 28 void GetCurrentPosition(double* latitude, double* longitude) const; | |
| 29 void SetCurrentPosition(double latitude, double longitude); | |
| 30 | |
| 31 private: | |
| 32 scoped_refptr<GeolocationArbitratorDependencyFactory> dependency_factory_; | |
| 33 | |
| 34 DISALLOW_COPY_AND_ASSIGN(MockGeolocation); | |
| 35 }; | |
| 36 | |
| 37 } // namespace content | |
| 38 | |
| 39 #endif // CONTENT_TEST_MOCK_GEOLOCATION_H_ | |
| OLD | NEW |