| 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..a025735d0560cd784b3bc3661b1c677f5ed91415
|
| --- /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_) {
|
| + service->PauseUpdates();
|
| + }
|
| +}
|
| +
|
| +void GeolocationServiceImplContext::ResumeUpdates() {
|
| + paused_ = false;
|
| + for (auto* service : attached_services_) {
|
| + service->ResumeUpdates();
|
| + }
|
| +}
|
| +
|
| +} // namespace content
|
|
|