OLD | NEW |
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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_WIN7_LOCATION_PROVIDER_WIN_H_ | 5 #ifndef CONTENT_BROWSER_GEOLOCATION_WIN7_LOCATION_PROVIDER_WIN_H_ |
6 #define CONTENT_BROWSER_GEOLOCATION_WIN7_LOCATION_PROVIDER_WIN_H_ | 6 #define CONTENT_BROWSER_GEOLOCATION_WIN7_LOCATION_PROVIDER_WIN_H_ |
7 | 7 |
8 #include "base/scoped_ptr.h" | 8 #include "base/scoped_ptr.h" |
9 #include "base/task.h" | 9 #include "base/task.h" |
10 #include "content/browser/geolocation/location_provider.h" | 10 #include "content/browser/geolocation/location_provider.h" |
11 #include "content/browser/geolocation/win7_location_api_win.h" | 11 #include "content/browser/geolocation/win7_location_api_win.h" |
12 #include "chrome/common/geoposition.h" | 12 #include "content/common/geoposition.h" |
13 | 13 |
14 // Location provider for Windows 7 that uses the Location and Sensors platform | 14 // Location provider for Windows 7 that uses the Location and Sensors platform |
15 // to obtain position fixes. | 15 // to obtain position fixes. |
16 // TODO(allanwoj): Remove polling and let the api signal when a new location. | 16 // TODO(allanwoj): Remove polling and let the api signal when a new location. |
17 // TODO(allanwoj): Possibly derive this class and the linux gps provider class | 17 // TODO(allanwoj): Possibly derive this class and the linux gps provider class |
18 // from a single SystemLocationProvider class as their implementation is very | 18 // from a single SystemLocationProvider class as their implementation is very |
19 // similar. | 19 // similar. |
20 class Win7LocationProvider : public LocationProviderBase { | 20 class Win7LocationProvider : public LocationProviderBase { |
21 public: | 21 public: |
22 Win7LocationProvider(Win7LocationApi* api); | 22 Win7LocationProvider(Win7LocationApi* api); |
(...skipping 12 matching lines...) Expand all Loading... |
35 // Will schedule a poll; i.e. enqueue DoPollTask deferred task. | 35 // Will schedule a poll; i.e. enqueue DoPollTask deferred task. |
36 void ScheduleNextPoll(int interval); | 36 void ScheduleNextPoll(int interval); |
37 | 37 |
38 scoped_ptr<Win7LocationApi> api_; | 38 scoped_ptr<Win7LocationApi> api_; |
39 Geoposition position_; | 39 Geoposition position_; |
40 // Holder for the tasks which run on the thread; takes care of cleanup. | 40 // Holder for the tasks which run on the thread; takes care of cleanup. |
41 ScopedRunnableMethodFactory<Win7LocationProvider> task_factory_; | 41 ScopedRunnableMethodFactory<Win7LocationProvider> task_factory_; |
42 }; | 42 }; |
43 | 43 |
44 #endif // CONTENT_BROWSER_GEOLOCATION_WIN7_LOCATION_PROVIDER_WIN_H_ | 44 #endif // CONTENT_BROWSER_GEOLOCATION_WIN7_LOCATION_PROVIDER_WIN_H_ |
OLD | NEW |