OLD | NEW |
---|---|
(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 #include "content/browser/geolocation/geolocation_service_impl_context.h" | |
6 | |
7 #include "content/browser/geolocation/geolocation_service_impl.h" | |
8 | |
9 namespace content { | |
10 | |
11 GeolocationServiceImplContext::GeolocationServiceImplContext() | |
12 : paused_(false) { | |
13 } | |
14 | |
15 GeolocationServiceImplContext::~GeolocationServiceImplContext() { | |
16 } | |
17 | |
18 void GeolocationServiceImplContext::AddService( | |
19 GeolocationServiceImpl* service) { | |
20 attached_services_.push_back(service); | |
21 } | |
22 | |
23 void GeolocationServiceImplContext::RemoveService( | |
24 GeolocationServiceImpl* service) { | |
25 attached_services_.remove(service); | |
26 } | |
27 | |
28 void GeolocationServiceImplContext::PauseUpdates() { | |
29 paused_ = true; | |
30 for (auto service : attached_services_) { | |
qsr
2014/10/07 13:03:58
You should be using auto* to make it clear that th
blundell
2014/10/07 14:35:24
Done.
| |
31 service->PauseUpdates(); | |
32 } | |
33 } | |
34 | |
35 void GeolocationServiceImplContext::ResumeUpdates() { | |
36 paused_ = false; | |
37 for (auto service : attached_services_) { | |
38 service->ResumeUpdates(); | |
39 } | |
40 } | |
41 | |
42 } // namespace content | |
OLD | NEW |