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