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

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

Issue 628773003: Partially convert geolocation IPC to Mojo. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Self-review Created 6 years, 2 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
(Empty)
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
3 // found in the LICENSE file.
4
5 #ifndef CONTENT_BROWSER_GEOLOCATION_GEOLOCATION_SERVICE_IMPL_CONTEXT_H_
6 #define CONTENT_BROWSER_GEOLOCATION_GEOLOCATION_SERVICE_IMPL_CONTEXT_H_
7
8 #include <list>
9
10 namespace content {
11 class GeolocationServiceImpl;
12
13 // Provides information to a set of GeolocationServiceImpl instances that are
14 // associated with a given context. Notably, allows pausing and resuming
15 // geolocation on these instances.
16 class GeolocationServiceImplContext {
17 public:
18 GeolocationServiceImplContext();
19 virtual ~GeolocationServiceImplContext();
20
21 // Adds and removes a service to this context.
22 void AddService(GeolocationServiceImpl* service);
23 void RemoveService(GeolocationServiceImpl* service);
24
25 // Pauses and resumes geolocation. Resuming when nothing is paused is a
26 // no-op. If a service is added while geolocation is paused, that service
27 // will not get geolocation updates until geolocation is resumed.
28 void PauseUpdates();
29 void ResumeUpdates();
30
31 // Returns whether geolocation updates are currently paused.
32 bool paused() { return paused_; }
qsr 2014/10/07 13:03:59 Could you tell me who is using this?
blundell 2014/10/07 14:35:24 GeolocationServiceImpl::OnLocationUpdate(). If we
33
34 private:
35 std::list<GeolocationServiceImpl*> attached_services_;
36 bool paused_;
37 };
38
39 } // namespace content
40
41 #endif // CONTENT_BROWSER_GEOLOCATION_GEOLOCATION_SERVICE_IMPL_CONTEXT_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698