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

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

Issue 2192683002: Reland 2:Geolocation: move from content/browser to device/ (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Ignore size_t_to_int truncation warning Created 4 years, 4 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 #ifndef CONTENT_BROWSER_GEOLOCATION_GEOLOCATION_SERVICE_CONTEXT_H_ 5 #ifndef DEVICE_GEOLOCATION_GEOLOCATION_SERVICE_CONTEXT_H_
6 #define CONTENT_BROWSER_GEOLOCATION_GEOLOCATION_SERVICE_CONTEXT_H_ 6 #define DEVICE_GEOLOCATION_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" 10 #include "device/geolocation/geolocation_export.h"
11 #include "third_party/WebKit/public/platform/modules/geolocation/geolocation.moj om.h" 11 #include "third_party/WebKit/public/platform/modules/geolocation/geolocation.moj om.h"
12 12
13 namespace content { 13 namespace device {
14
15 class GeolocationServiceImpl;
16 struct Geoposition;
14 17
15 // Provides information to a set of GeolocationServiceImpl instances that are 18 // Provides information to a set of GeolocationServiceImpl instances that are
16 // associated with a given context. Notably, allows pausing and resuming 19 // associated with a given context. Notably, allows pausing and resuming
17 // geolocation on these instances. 20 // geolocation on these instances.
18 class GeolocationServiceContext { 21 class DEVICE_GEOLOCATION_EXPORT GeolocationServiceContext {
19 public: 22 public:
20 GeolocationServiceContext(); 23 GeolocationServiceContext();
21 virtual ~GeolocationServiceContext(); 24 virtual ~GeolocationServiceContext();
22 25
23 // Creates a GeolocationServiceImpl that is weakly bound to |request|. 26 // Creates a GeolocationServiceImpl that is weakly bound to |request|.
24 // |update_callback| will be called when services send 27 // |update_callback| will be called when services send
25 // location updates to their clients. 28 // location updates to their clients.
26 void CreateService( 29 void CreateService(
27 const base::Closure& update_callback, 30 const base::Closure& update_callback,
28 mojo::InterfaceRequest<blink::mojom::GeolocationService> request); 31 mojo::InterfaceRequest<blink::mojom::GeolocationService> request);
(...skipping 20 matching lines...) Expand all
49 52
50 private: 53 private:
51 ScopedVector<GeolocationServiceImpl> services_; 54 ScopedVector<GeolocationServiceImpl> services_;
52 bool paused_; 55 bool paused_;
53 56
54 std::unique_ptr<Geoposition> geoposition_override_; 57 std::unique_ptr<Geoposition> geoposition_override_;
55 58
56 DISALLOW_COPY_AND_ASSIGN(GeolocationServiceContext); 59 DISALLOW_COPY_AND_ASSIGN(GeolocationServiceContext);
57 }; 60 };
58 61
59 } // namespace content 62 } // namespace device
60 63
61 #endif // CONTENT_BROWSER_GEOLOCATION_GEOLOCATION_SERVICE_CONTEXT_H_ 64 #endif // DEVICE_GEOLOCATION_GEOLOCATION_SERVICE_CONTEXT_H_
OLDNEW
« no previous file with comments | « device/geolocation/geolocation_provider_impl_unittest.cc ('k') | device/geolocation/geolocation_service_context.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698