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

Side by Side Diff: content/browser/geofencing/mock_geofencing_service.h

Issue 701953007: Expose mock geofencing service via testRunner. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years 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 unified diff | Download patch
OLDNEW
(Empty)
1 // Copyright 2014 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_BROWSER_GEOFENCING_MOCK_GEOFENCING_SERVICE_H_
6 #define CONTENT_BROWSER_GEOFENCING_MOCK_GEOFENCING_SERVICE_H_
7
8 #include <map>
9
10 #include "content/browser/geofencing/geofencing_service.h"
11
12 namespace content {
13
14 class MockGeofencingService : public GeofencingService {
15 public:
16 MockGeofencingService(bool service_available);
17 ~MockGeofencingService() override;
18
19 void SetMockPosition(double latitude, double longitude);
20
21 bool IsServiceAvailable() override;
22 int64 RegisterRegion(const blink::WebCircularGeofencingRegion& region,
23 GeofencingRegistrationDelegate* delegate) override;
24 void UnregisterRegion(int64 geofencing_registration_id) override;
25
26 private:
27 struct Registration;
28
29 bool available_;
30 std::map<int64, Registration> registrations_;
31 int64 next_id_;
32 bool has_position_;
33 double last_latitude_;
34 double last_longitude_;
35 };
36
37 } // namespace content
38
39 #endif // CONTENT_BROWSER_GEOFENCING_MOCK_GEOFENCING_SERVICE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698