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

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

Issue 2192683003: Revert of Reland: Geolocation: move from content/browser to device/ (patchset #2 id:20001 of https:… (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@2810
Patch Set: 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 DEVICE_GEOLOCATION_GEOLOCATION_SERVICE_CONTEXT_H_ 5 #ifndef CONTENT_BROWSER_GEOLOCATION_GEOLOCATION_SERVICE_CONTEXT_H_
6 #define DEVICE_GEOLOCATION_GEOLOCATION_SERVICE_CONTEXT_H_ 6 #define CONTENT_BROWSER_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 "device/geolocation/geolocation_export.h" 10 #include "content/browser/geolocation/geolocation_service_impl.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 device { 13 namespace content {
14
15 class GeolocationServiceImpl;
16 struct Geoposition;
17 14
18 // Provides information to a set of GeolocationServiceImpl instances that are 15 // Provides information to a set of GeolocationServiceImpl instances that are
19 // associated with a given context. Notably, allows pausing and resuming 16 // associated with a given context. Notably, allows pausing and resuming
20 // geolocation on these instances. 17 // geolocation on these instances.
21 class DEVICE_GEOLOCATION_EXPORT GeolocationServiceContext { 18 class GeolocationServiceContext {
22 public: 19 public:
23 GeolocationServiceContext(); 20 GeolocationServiceContext();
24 virtual ~GeolocationServiceContext(); 21 virtual ~GeolocationServiceContext();
25 22
26 // Creates a GeolocationServiceImpl that is weakly bound to |request|. 23 // Creates a GeolocationServiceImpl that is weakly bound to |request|.
27 // |update_callback| will be called when services send 24 // |update_callback| will be called when services send
28 // location updates to their clients. 25 // location updates to their clients.
29 void CreateService( 26 void CreateService(
30 const base::Closure& update_callback, 27 const base::Closure& update_callback,
31 mojo::InterfaceRequest<blink::mojom::GeolocationService> request); 28 mojo::InterfaceRequest<blink::mojom::GeolocationService> request);
(...skipping 20 matching lines...) Expand all
52 49
53 private: 50 private:
54 ScopedVector<GeolocationServiceImpl> services_; 51 ScopedVector<GeolocationServiceImpl> services_;
55 bool paused_; 52 bool paused_;
56 53
57 std::unique_ptr<Geoposition> geoposition_override_; 54 std::unique_ptr<Geoposition> geoposition_override_;
58 55
59 DISALLOW_COPY_AND_ASSIGN(GeolocationServiceContext); 56 DISALLOW_COPY_AND_ASSIGN(GeolocationServiceContext);
60 }; 57 };
61 58
62 } // namespace device 59 } // namespace content
63 60
64 #endif // DEVICE_GEOLOCATION_GEOLOCATION_SERVICE_CONTEXT_H_ 61 #endif // CONTENT_BROWSER_GEOLOCATION_GEOLOCATION_SERVICE_CONTEXT_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698