Chromium Code Reviews| Index: content/browser/geolocation/mock_location_arbitrator.cc |
| diff --git a/content/browser/geolocation/mock_location_arbitrator.cc b/content/browser/geolocation/mock_location_arbitrator.cc |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..f7292a58fd7cf505c1e9a856e0987cb4f13f1f7a |
| --- /dev/null |
| +++ b/content/browser/geolocation/mock_location_arbitrator.cc |
| @@ -0,0 +1,34 @@ |
| +// Copyright (c) 2012 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/mock_location_arbitrator.h" |
| + |
| +#include "base/message_loop.h" |
| +#include "content/public/common/geoposition.h" |
| + |
| +namespace content { |
| + |
| +MockGeolocationArbitrator::MockGeolocationArbitrator() |
| + : permission_granted_(false), |
| + providers_started_(false) { |
| +} |
| + |
| +void MockGeolocationArbitrator::StartProviders( |
| + const GeolocationObserverOptions& options) { |
| + providers_started_ = true;; |
| +} |
| + |
| +void MockGeolocationArbitrator::StopProviders() { |
| + providers_started_ = false; |
| +} |
| + |
| +void MockGeolocationArbitrator::OnPermissionGranted() { |
| + permission_granted_ = true; |
| +} |
| + |
| +bool MockGeolocationArbitrator::HasPermissionBeenGranted() const { |
| + return permission_granted_; |
| +} |
| + |
| +} |
|
bulach
2012/11/28 19:35:59
nit: // namespace content
John Knottenbelt
2012/11/29 17:31:01
Done.
|