Chromium Code Reviews| Index: content/browser/geolocation/geolocation_service_impl_context.cc |
| diff --git a/content/browser/geolocation/geolocation_service_impl_context.cc b/content/browser/geolocation/geolocation_service_impl_context.cc |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..28df260accf8c78151d770e3e42e993b8d69e6a2 |
| --- /dev/null |
| +++ b/content/browser/geolocation/geolocation_service_impl_context.cc |
| @@ -0,0 +1,42 @@ |
| +// Copyright 2014 The Chromium Authors. All rights reserved. |
| +// Use of this source code is governed by a BSD-style license that can be |
| +// found in the LICENSE file. |
| + |
| +#include "content/browser/geolocation/geolocation_service_impl_context.h" |
| + |
| +#include "content/browser/geolocation/geolocation_service_impl.h" |
| + |
| +namespace content { |
| + |
| +GeolocationServiceImplContext::GeolocationServiceImplContext() |
| + : paused_(false) { |
| +} |
| + |
| +GeolocationServiceImplContext::~GeolocationServiceImplContext() { |
| +} |
| + |
| +void GeolocationServiceImplContext::AddService( |
| + GeolocationServiceImpl* service) { |
| + attached_services_.push_back(service); |
| +} |
| + |
| +void GeolocationServiceImplContext::RemoveService( |
| + GeolocationServiceImpl* service) { |
| + attached_services_.remove(service); |
| +} |
| + |
| +void GeolocationServiceImplContext::PauseUpdates() { |
| + paused_ = true; |
| + 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.
|
| + service->PauseUpdates(); |
| + } |
| +} |
| + |
| +void GeolocationServiceImplContext::ResumeUpdates() { |
| + paused_ = false; |
| + for (auto service : attached_services_) { |
| + service->ResumeUpdates(); |
| + } |
| +} |
| + |
| +} // namespace content |