OLD | NEW |
1 // Copyright (c) 2012 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_PROVIDER_IMPL_H_ | 5 #ifndef CONTENT_BROWSER_GEOLOCATION_GEOLOCATION_PROVIDER_IMPL_H_ |
6 #define CONTENT_BROWSER_GEOLOCATION_GEOLOCATION_PROVIDER_IMPL_H_ | 6 #define CONTENT_BROWSER_GEOLOCATION_GEOLOCATION_PROVIDER_IMPL_H_ |
7 | 7 |
8 #include <list> | 8 #include <list> |
9 #include <vector> | 9 #include <vector> |
10 | 10 |
11 #include "base/basictypes.h" | 11 #include "base/basictypes.h" |
12 #include "base/callback_forward.h" | 12 #include "base/callback_forward.h" |
13 #include "base/compiler_specific.h" | 13 #include "base/compiler_specific.h" |
14 #include "base/threading/thread.h" | 14 #include "base/threading/thread.h" |
15 #include "content/common/content_export.h" | 15 #include "content/common/content_export.h" |
16 #include "content/public/browser/geolocation_provider.h" | 16 #include "content/public/browser/geolocation_provider.h" |
17 #include "content/public/common/geoposition.h" | 17 #include "content/public/common/geoposition.h" |
18 | 18 |
19 template<typename Type> struct DefaultSingletonTraits; | 19 template<typename Type> struct DefaultSingletonTraits; |
20 | 20 |
21 namespace content { | 21 namespace content { |
22 class GeolocationArbitrator; | 22 class GeolocationArbitrator; |
23 class GeolocationProviderTest; | |
24 | 23 |
25 // This is the main API to the geolocation subsystem. The application will hold | 24 // This is the main API to the geolocation subsystem. The application will hold |
26 // a single instance of this class and can register multiple clients to be | 25 // a single instance of this class and can register multiple clients to be |
27 // notified of location changes: | 26 // notified of location changes: |
28 // * Callbacks are registered by AddLocationUpdateCallback() and will keep | 27 // * Callbacks are registered by AddLocationUpdateCallback() and will keep |
29 // receiving updates until unregistered by RemoveLocationUpdateCallback(). | 28 // receiving updates until unregistered by RemoveLocationUpdateCallback(). |
30 // The application must instantiate the GeolocationProvider on the IO thread and | 29 // The application must instantiate the GeolocationProvider on the IO thread and |
31 // must communicate with it on the same thread. | 30 // must communicate with it on the same thread. |
32 // The underlying location arbitrator will only be enabled whilst there is at | 31 // The underlying location arbitrator will only be enabled whilst there is at |
33 // least one registered observer or pending callback. The arbitrator and the | 32 // least one registered observer or pending callback. The arbitrator and the |
(...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
105 | 104 |
106 // Only to be used on the geolocation thread. | 105 // Only to be used on the geolocation thread. |
107 GeolocationArbitrator* arbitrator_; | 106 GeolocationArbitrator* arbitrator_; |
108 | 107 |
109 DISALLOW_COPY_AND_ASSIGN(GeolocationProviderImpl); | 108 DISALLOW_COPY_AND_ASSIGN(GeolocationProviderImpl); |
110 }; | 109 }; |
111 | 110 |
112 } // namespace content | 111 } // namespace content |
113 | 112 |
114 #endif // CONTENT_BROWSER_GEOLOCATION_GEOLOCATION_PROVIDER_IMPL_H_ | 113 #endif // CONTENT_BROWSER_GEOLOCATION_GEOLOCATION_PROVIDER_IMPL_H_ |
OLD | NEW |