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

Unified Diff: blimp/engine/feature/geolocation/mock_blimp_location_provider_delegate.h

Issue 2091023006: Adds EngineGeolocationFeature for Blimp Geolocation project. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Merge 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/engine/feature/geolocation/mock_blimp_location_provider_delegate.h
diff --git a/blimp/engine/feature/geolocation/mock_blimp_location_provider_delegate.h b/blimp/engine/feature/geolocation/mock_blimp_location_provider_delegate.h
new file mode 100644
index 0000000000000000000000000000000000000000..e61776567574e4558628bbcb592f21f8ec67eb20
--- /dev/null
+++ b/blimp/engine/feature/geolocation/mock_blimp_location_provider_delegate.h
@@ -0,0 +1,40 @@
+// 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_ENGINE_FEATURE_GEOLOCATION_MOCK_BLIMP_LOCATION_PROVIDER_DELEGATE_H_
+#define BLIMP_ENGINE_FEATURE_GEOLOCATION_MOCK_BLIMP_LOCATION_PROVIDER_DELEGATE_H_
+
+#include "blimp/engine/feature/geolocation/blimp_location_provider.h"
+#include "testing/gmock/include/gmock/gmock.h"
+
+namespace blimp {
+namespace engine {
+
+class MockBlimpLocationProviderDelegate
+ : public BlimpLocationProvider::Delegate {
+ public:
+ MockBlimpLocationProviderDelegate();
+ ~MockBlimpLocationProviderDelegate();
+
+ base::WeakPtr<MockBlimpLocationProviderDelegate> GetWeakPtr() {
+ return weak_factory_.GetWeakPtr();
+ }
+
+ MOCK_METHOD1(RequestAccuracy,
+ void(GeolocationSetInterestLevelMessage::Level level));
+ MOCK_METHOD0(RequestRefresh, void());
+ MOCK_METHOD1(
+ SetUpdateCallback,
+ void(const base::Callback<void(const content::Geoposition&)>& callback));
+
+ private:
+ base::WeakPtrFactory<MockBlimpLocationProviderDelegate> weak_factory_;
+
+ DISALLOW_COPY_AND_ASSIGN(MockBlimpLocationProviderDelegate);
+};
+
+} // namespace engine
+} // namespace blimp
+
+#endif // BLIMP_ENGINE_FEATURE_GEOLOCATION_MOCK_BLIMP_LOCATION_PROVIDER_DELEGATE_H_

Powered by Google App Engine
This is Rietveld 408576698