Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(487)

Unified Diff: blimp/client/feature/mock_location_provider.h

Issue 2161223003: Adds GeolocationFeature for Blimp Geolocation project. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@engine_feature_prep
Patch Set: Addresses kmarshall's #14 comments Created 4 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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_

Powered by Google App Engine
This is Rietveld 408576698