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

Unified Diff: content/browser/geolocation/geolocation_observer.h

Issue 6597044: Revert 76228 - Move core pieces of geolocation from chrome to content.This is... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 9 years, 10 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: content/browser/geolocation/geolocation_observer.h
===================================================================
--- content/browser/geolocation/geolocation_observer.h (revision 76230)
+++ content/browser/geolocation/geolocation_observer.h (working copy)
@@ -1,51 +0,0 @@
-// Copyright (c) 2010 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 CONTENT_BROWSER_GEOLOCATION_GEOLOCATION_OBSERVER_H_
-#define CONTENT_BROWSER_GEOLOCATION_GEOLOCATION_OBSERVER_H_
-#pragma once
-
-#include "base/basictypes.h"
-
-struct Geoposition;
-
-// This interface is implemented by observers of GeolocationProvider as
-// well as GeolocationProvider itself as an observer of GeolocationArbitrator.
-class GeolocationObserver {
- public:
- // This will be called whenever the 'best available' location is updated,
- // or when an error is encountered meaning no location data will be
- // available in the forseeable future.
- virtual void OnLocationUpdate(const Geoposition& position) = 0;
-
- protected:
- GeolocationObserver() {}
- virtual ~GeolocationObserver() {}
-
- private:
- DISALLOW_COPY_AND_ASSIGN(GeolocationObserver);
-};
-
-struct GeolocationObserverOptions {
- GeolocationObserverOptions() : use_high_accuracy(false) {}
- explicit GeolocationObserverOptions(bool high_accuracy)
- : use_high_accuracy(high_accuracy) {}
-
- // Given a map<ANYTHING, GeolocationObserverOptions> this function will
- // iterate the map and collapse all the options found to a single instance
- // that satisfies them all.
- template <typename MAP>
- static GeolocationObserverOptions Collapse(const MAP& options_map) {
- for (typename MAP::const_iterator it = options_map.begin();
- it != options_map.end(); ++it) {
- if (it->second.use_high_accuracy)
- return GeolocationObserverOptions(true);
- }
- return GeolocationObserverOptions(false);
- }
-
- bool use_high_accuracy;
-};
-
-#endif // CONTENT_BROWSER_GEOLOCATION_GEOLOCATION_OBSERVER_H_

Powered by Google App Engine
This is Rietveld 408576698