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

Side by Side Diff: device/geolocation/geolocation_service_impl.h

Issue 2866003002: Use OnceCallback on Mojo interfaces in //device/geolocation (Closed)
Patch Set: rebase Created 3 years, 6 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 unified diff | Download patch
« no previous file with comments | « no previous file | device/geolocation/geolocation_service_impl.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 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 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include <memory> 5 #include <memory>
6 6
7 #include "base/macros.h" 7 #include "base/macros.h"
8 #include "device/geolocation/geolocation_provider_impl.h" 8 #include "device/geolocation/geolocation_provider_impl.h"
9 #include "device/geolocation/public/interfaces/geolocation.mojom.h" 9 #include "device/geolocation/public/interfaces/geolocation.mojom.h"
10 #include "mojo/public/cpp/bindings/binding.h" 10 #include "mojo/public/cpp/bindings/binding.h"
(...skipping 24 matching lines...) Expand all
35 void PauseUpdates(); 35 void PauseUpdates();
36 void ResumeUpdates(); 36 void ResumeUpdates();
37 37
38 // Enables and disables geolocation override. 38 // Enables and disables geolocation override.
39 void SetOverride(const Geoposition& position); 39 void SetOverride(const Geoposition& position);
40 void ClearOverride(); 40 void ClearOverride();
41 41
42 private: 42 private:
43 // mojom::GeolocationService: 43 // mojom::GeolocationService:
44 void SetHighAccuracy(bool high_accuracy) override; 44 void SetHighAccuracy(bool high_accuracy) override;
45 void QueryNextPosition(const QueryNextPositionCallback& callback) override; 45 void QueryNextPosition(QueryNextPositionCallback callback) override;
46 46
47 void OnConnectionError(); 47 void OnConnectionError();
48 48
49 void OnLocationUpdate(const Geoposition& position); 49 void OnLocationUpdate(const Geoposition& position);
50 void ReportCurrentPosition(); 50 void ReportCurrentPosition();
51 51
52 // The binding between this object and the other end of the pipe. 52 // The binding between this object and the other end of the pipe.
53 mojo::Binding<mojom::GeolocationService> binding_; 53 mojo::Binding<mojom::GeolocationService> binding_;
54 54
55 // Owns this object. 55 // Owns this object.
(...skipping 14 matching lines...) Expand all
70 bool high_accuracy_; 70 bool high_accuracy_;
71 71
72 bool has_position_to_report_; 72 bool has_position_to_report_;
73 73
74 DISALLOW_COPY_AND_ASSIGN(GeolocationServiceImpl); 74 DISALLOW_COPY_AND_ASSIGN(GeolocationServiceImpl);
75 }; 75 };
76 76
77 } // namespace device 77 } // namespace device
78 78
79 #endif // DEVICE_GEOLOCATION_GEOLOCATION_SERVICE_IMPL_H_ 79 #endif // DEVICE_GEOLOCATION_GEOLOCATION_SERVICE_IMPL_H_
OLDNEW
« no previous file with comments | « no previous file | device/geolocation/geolocation_service_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698