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

Side by Side Diff: content/browser/geolocation/geolocation_service_impl.h

Issue 1874893002: Convert //content/browser from scoped_ptr to std::unique_ptr (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 8 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
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>
6
5 #include "base/macros.h" 7 #include "base/macros.h"
6 #include "base/memory/scoped_ptr.h"
7 #include "content/browser/geolocation/geolocation_provider_impl.h" 8 #include "content/browser/geolocation/geolocation_provider_impl.h"
8 #include "mojo/public/cpp/bindings/binding.h" 9 #include "mojo/public/cpp/bindings/binding.h"
9 #include "third_party/WebKit/public/platform/modules/geolocation/geolocation.moj om.h" 10 #include "third_party/WebKit/public/platform/modules/geolocation/geolocation.moj om.h"
10 11
11 #ifndef CONTENT_BROWSER_GEOLOCATION_GEOLOCATION_SERVICE_IMPL_H_ 12 #ifndef CONTENT_BROWSER_GEOLOCATION_GEOLOCATION_SERVICE_IMPL_H_
12 #define CONTENT_BROWSER_GEOLOCATION_GEOLOCATION_SERVICE_IMPL_H_ 13 #define CONTENT_BROWSER_GEOLOCATION_GEOLOCATION_SERVICE_IMPL_H_
13 14
14 namespace content { 15 namespace content {
15 16
16 class GeolocationProvider; 17 class GeolocationProvider;
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
49 void OnConnectionError(); 50 void OnConnectionError();
50 51
51 void OnLocationUpdate(const Geoposition& position); 52 void OnLocationUpdate(const Geoposition& position);
52 void ReportCurrentPosition(); 53 void ReportCurrentPosition();
53 54
54 // The binding between this object and the other end of the pipe. 55 // The binding between this object and the other end of the pipe.
55 mojo::Binding<blink::mojom::GeolocationService> binding_; 56 mojo::Binding<blink::mojom::GeolocationService> binding_;
56 57
57 // Owns this object. 58 // Owns this object.
58 GeolocationServiceContext* context_; 59 GeolocationServiceContext* context_;
59 scoped_ptr<GeolocationProvider::Subscription> geolocation_subscription_; 60 std::unique_ptr<GeolocationProvider::Subscription> geolocation_subscription_;
60 61
61 // Callback that allows the instantiator of this class to be notified on 62 // Callback that allows the instantiator of this class to be notified on
62 // position updates. 63 // position updates.
63 base::Closure update_callback_; 64 base::Closure update_callback_;
64 65
65 // The callback passed to QueryNextPosition. 66 // The callback passed to QueryNextPosition.
66 PositionCallback position_callback_; 67 PositionCallback position_callback_;
67 68
68 // Valid iff SetOverride() has been called and ClearOverride() has not 69 // Valid iff SetOverride() has been called and ClearOverride() has not
69 // subsequently been called. 70 // subsequently been called.
70 Geoposition position_override_; 71 Geoposition position_override_;
71 72
72 blink::mojom::Geoposition current_position_; 73 blink::mojom::Geoposition current_position_;
73 74
74 // Whether this instance is currently observing location updates with high 75 // Whether this instance is currently observing location updates with high
75 // accuracy. 76 // accuracy.
76 bool high_accuracy_; 77 bool high_accuracy_;
77 78
78 bool has_position_to_report_; 79 bool has_position_to_report_;
79 80
80 DISALLOW_COPY_AND_ASSIGN(GeolocationServiceImpl); 81 DISALLOW_COPY_AND_ASSIGN(GeolocationServiceImpl);
81 }; 82 };
82 83
83 } // namespace content 84 } // namespace content
84 85
85 #endif // CONTENT_BROWSER_GEOLOCATION_GEOLOCATION_SERVICE_IMPL_H_ 86 #endif // CONTENT_BROWSER_GEOLOCATION_GEOLOCATION_SERVICE_IMPL_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698