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

Side by Side Diff: content/browser/geolocation/geolocation_observer.h

Issue 10316007: Make the Geoposition helper class public (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Fix forward-declaration of struct as class. Created 8 years, 7 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 unified diff | Download patch
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef CONTENT_BROWSER_GEOLOCATION_GEOLOCATION_OBSERVER_H_ 5 #ifndef CONTENT_BROWSER_GEOLOCATION_GEOLOCATION_OBSERVER_H_
6 #define CONTENT_BROWSER_GEOLOCATION_GEOLOCATION_OBSERVER_H_ 6 #define CONTENT_BROWSER_GEOLOCATION_GEOLOCATION_OBSERVER_H_
7 #pragma once 7 #pragma once
8 8
9 #include "base/basictypes.h" 9 #include "base/basictypes.h"
10 #include "content/common/content_export.h" 10 #include "content/common/content_export.h"
11 11
12 namespace content {
12 struct Geoposition; 13 struct Geoposition;
14 }
13 15
14 // This interface is implemented by observers of GeolocationProvider as 16 // This interface is implemented by observers of GeolocationProvider as
15 // well as GeolocationProvider itself as an observer of GeolocationArbitrator. 17 // well as GeolocationProvider itself as an observer of GeolocationArbitrator.
16 class CONTENT_EXPORT GeolocationObserver { 18 class CONTENT_EXPORT GeolocationObserver {
17 public: 19 public:
18 // This will be called whenever the 'best available' location is updated, 20 // This will be called whenever the 'best available' location is updated,
19 // or when an error is encountered meaning no location data will be 21 // or when an error is encountered meaning no location data will be
20 // available in the forseeable future. 22 // available in the forseeable future.
21 virtual void OnLocationUpdate(const Geoposition& position) = 0; 23 virtual void OnLocationUpdate(const content::Geoposition& position) = 0;
22 24
23 protected: 25 protected:
24 GeolocationObserver() {} 26 GeolocationObserver() {}
25 virtual ~GeolocationObserver() {} 27 virtual ~GeolocationObserver() {}
26 28
27 private: 29 private:
28 DISALLOW_COPY_AND_ASSIGN(GeolocationObserver); 30 DISALLOW_COPY_AND_ASSIGN(GeolocationObserver);
29 }; 31 };
30 32
31 struct GeolocationObserverOptions { 33 struct GeolocationObserverOptions {
(...skipping 11 matching lines...) Expand all
43 if (it->second.use_high_accuracy) 45 if (it->second.use_high_accuracy)
44 return GeolocationObserverOptions(true); 46 return GeolocationObserverOptions(true);
45 } 47 }
46 return GeolocationObserverOptions(false); 48 return GeolocationObserverOptions(false);
47 } 49 }
48 50
49 bool use_high_accuracy; 51 bool use_high_accuracy;
50 }; 52 };
51 53
52 #endif // CONTENT_BROWSER_GEOLOCATION_GEOLOCATION_OBSERVER_H_ 54 #endif // CONTENT_BROWSER_GEOLOCATION_GEOLOCATION_OBSERVER_H_
OLDNEW
« no previous file with comments | « content/browser/geolocation/geolocation_dispatcher_host.cc ('k') | content/browser/geolocation/geolocation_provider.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698