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

Unified Diff: device/geolocation/geolocation_service_context.h

Issue 2192683003: Revert of Reland: Geolocation: move from content/browser to device/ (patchset #2 id:20001 of https:… (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@2810
Patch Set: Created 4 years, 5 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 side-by-side diff with in-line comments
Download patch
Index: device/geolocation/geolocation_service_context.h
diff --git a/device/geolocation/geolocation_service_context.h b/device/geolocation/geolocation_service_context.h
deleted file mode 100644
index dab0fc5df7572542ae35f3e0f9238ccbb5e436ce..0000000000000000000000000000000000000000
--- a/device/geolocation/geolocation_service_context.h
+++ /dev/null
@@ -1,64 +0,0 @@
-// 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.
-
-#ifndef DEVICE_GEOLOCATION_GEOLOCATION_SERVICE_CONTEXT_H_
-#define DEVICE_GEOLOCATION_GEOLOCATION_SERVICE_CONTEXT_H_
-
-#include "base/macros.h"
-#include "base/memory/scoped_vector.h"
-#include "device/geolocation/geolocation_export.h"
-#include "third_party/WebKit/public/platform/modules/geolocation/geolocation.mojom.h"
-
-namespace device {
-
-class GeolocationServiceImpl;
-struct Geoposition;
-
-// Provides information to a set of GeolocationServiceImpl instances that are
-// associated with a given context. Notably, allows pausing and resuming
-// geolocation on these instances.
-class DEVICE_GEOLOCATION_EXPORT GeolocationServiceContext {
- public:
- GeolocationServiceContext();
- virtual ~GeolocationServiceContext();
-
- // Creates a GeolocationServiceImpl that is weakly bound to |request|.
- // |update_callback| will be called when services send
- // location updates to their clients.
- void CreateService(
- const base::Closure& update_callback,
- mojo::InterfaceRequest<blink::mojom::GeolocationService> request);
-
- // Called when a service has a connection error. After this call, it is no
- // longer safe to access |service|.
- void ServiceHadConnectionError(GeolocationServiceImpl* service);
-
- // Pauses and resumes geolocation. Resuming when nothing is paused is a
- // no-op. If a service is added while geolocation is paused, that service
- // will not get geolocation updates until geolocation is resumed.
- void PauseUpdates();
- void ResumeUpdates();
-
- // Returns whether geolocation updates are currently paused.
- bool paused() { return paused_; }
-
- // Enables geolocation override. This method can be used to trigger possible
- // location-specific behavior in a particular context.
- void SetOverride(std::unique_ptr<Geoposition> geoposition);
-
- // Disables geolocation override.
- void ClearOverride();
-
- private:
- ScopedVector<GeolocationServiceImpl> services_;
- bool paused_;
-
- std::unique_ptr<Geoposition> geoposition_override_;
-
- DISALLOW_COPY_AND_ASSIGN(GeolocationServiceContext);
-};
-
-} // namespace device
-
-#endif // DEVICE_GEOLOCATION_GEOLOCATION_SERVICE_CONTEXT_H_
« no previous file with comments | « device/geolocation/geolocation_provider_impl_unittest.cc ('k') | device/geolocation/geolocation_service_context.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698