Chromium Code Reviews| OLD | NEW |
|---|---|
| 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 #ifndef CONTENT_BROWSER_GEOLOCATION_GEOLOCATION_SERVICE_CONTEXT_H_ | 5 #ifndef DEVICE_GEOLOCATION_PUBLIC_CPP_GEOLOCATION_SERVICE_CONTEXT_H_ |
| 6 #define CONTENT_BROWSER_GEOLOCATION_GEOLOCATION_SERVICE_CONTEXT_H_ | 6 #define DEVICE_GEOLOCATION_PUBLIC_CPP_GEOLOCATION_SERVICE_CONTEXT_H_ |
| 7 | 7 |
| 8 #include "base/macros.h" | 8 #include "base/macros.h" |
| 9 #include "base/memory/scoped_vector.h" | 9 #include "base/memory/scoped_vector.h" |
| 10 #include "content/browser/geolocation/geolocation_service_impl.h" | |
| 11 #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" |
| 12 | 11 |
| 13 namespace content { | 12 namespace device { |
| 13 | |
| 14 class GeolocationServiceImpl; | |
| 15 struct Geoposition; | |
| 14 | 16 |
| 15 // Provides information to a set of GeolocationServiceImpl instances that are | 17 // Provides information to a set of GeolocationServiceImpl instances that are |
| 16 // associated with a given context. Notably, allows pausing and resuming | 18 // associated with a given context. Notably, allows pausing and resuming |
|
jam
2016/07/25 22:29:21
this class is browser-context (i.e. profile) speci
mcasas
2016/07/26 00:17:23
Probably not at this point, but it depends
on othe
jam
2016/07/26 17:21:29
ok so on second thoughts, looking at how this is u
mcasas
2016/07/26 17:45:32
Acknowledged.
| |
| 17 // geolocation on these instances. | 19 // geolocation on these instances. |
| 18 class GeolocationServiceContext { | 20 class GeolocationServiceContext { |
| 19 public: | 21 public: |
| 20 GeolocationServiceContext(); | 22 GeolocationServiceContext(); |
| 21 virtual ~GeolocationServiceContext(); | 23 virtual ~GeolocationServiceContext(); |
| 22 | 24 |
| 23 // Creates a GeolocationServiceImpl that is weakly bound to |request|. | 25 // Creates a GeolocationServiceImpl that is weakly bound to |request|. |
| 24 // |update_callback| will be called when services send | 26 // |update_callback| will be called when services send |
| 25 // location updates to their clients. | 27 // location updates to their clients. |
| 26 void CreateService( | 28 void CreateService( |
| (...skipping 22 matching lines...) Expand all Loading... | |
| 49 | 51 |
| 50 private: | 52 private: |
| 51 ScopedVector<GeolocationServiceImpl> services_; | 53 ScopedVector<GeolocationServiceImpl> services_; |
| 52 bool paused_; | 54 bool paused_; |
| 53 | 55 |
| 54 std::unique_ptr<Geoposition> geoposition_override_; | 56 std::unique_ptr<Geoposition> geoposition_override_; |
| 55 | 57 |
| 56 DISALLOW_COPY_AND_ASSIGN(GeolocationServiceContext); | 58 DISALLOW_COPY_AND_ASSIGN(GeolocationServiceContext); |
| 57 }; | 59 }; |
| 58 | 60 |
| 59 } // namespace content | 61 } // namespace device |
| 60 | 62 |
| 61 #endif // CONTENT_BROWSER_GEOLOCATION_GEOLOCATION_SERVICE_CONTEXT_H_ | 63 #endif // DEVICE_GEOLOCATION_PUBLIC_CPP_GEOLOCATION_SERVICE_CONTEXT_H_ |
| OLD | NEW |