| OLD | NEW |
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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 DEVICE_GEOLOCATION_WIFI_DATA_PROVIDER_H_ | 5 #ifndef CONTENT_BROWSER_GEOLOCATION_WIFI_DATA_PROVIDER_H_ |
| 6 #define DEVICE_GEOLOCATION_WIFI_DATA_PROVIDER_H_ | 6 #define CONTENT_BROWSER_GEOLOCATION_WIFI_DATA_PROVIDER_H_ |
| 7 | 7 |
| 8 #include <set> | 8 #include <set> |
| 9 | 9 |
| 10 #include "base/callback_forward.h" | 10 #include "base/callback_forward.h" |
| 11 #include "base/macros.h" | 11 #include "base/macros.h" |
| 12 #include "base/memory/ref_counted.h" | 12 #include "base/memory/ref_counted.h" |
| 13 #include "base/single_thread_task_runner.h" | 13 #include "base/single_thread_task_runner.h" |
| 14 #include "device/geolocation/geolocation_export.h" | 14 #include "content/browser/geolocation/wifi_data.h" |
| 15 #include "device/geolocation/wifi_data.h" | 15 #include "content/common/content_export.h" |
| 16 | 16 |
| 17 namespace device { | 17 namespace content { |
| 18 | 18 |
| 19 class DEVICE_GEOLOCATION_EXPORT WifiDataProvider | 19 class CONTENT_EXPORT WifiDataProvider |
| 20 : public base::RefCountedThreadSafe<WifiDataProvider> { | 20 : public base::RefCountedThreadSafe<WifiDataProvider> { |
| 21 public: | 21 public: |
| 22 WifiDataProvider(); | 22 WifiDataProvider(); |
| 23 | 23 |
| 24 // Tells the provider to start looking for data. Callbacks will start | 24 // Tells the provider to start looking for data. Callbacks will start |
| 25 // receiving notifications after this call. | 25 // receiving notifications after this call. |
| 26 virtual void StartDataProvider() = 0; | 26 virtual void StartDataProvider() = 0; |
| 27 | 27 |
| 28 // Tells the provider to stop looking for data. Callbacks will stop | 28 // Tells the provider to stop looking for data. Callbacks will stop |
| 29 // receiving notifications after this call. | 29 // receiving notifications after this call. |
| (...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 62 void DoRunCallbacks(); | 62 void DoRunCallbacks(); |
| 63 | 63 |
| 64 // The task runner for the client thread, all callbacks should run on it. | 64 // The task runner for the client thread, all callbacks should run on it. |
| 65 scoped_refptr<base::SingleThreadTaskRunner> client_task_runner_; | 65 scoped_refptr<base::SingleThreadTaskRunner> client_task_runner_; |
| 66 | 66 |
| 67 CallbackSet callbacks_; | 67 CallbackSet callbacks_; |
| 68 | 68 |
| 69 DISALLOW_COPY_AND_ASSIGN(WifiDataProvider); | 69 DISALLOW_COPY_AND_ASSIGN(WifiDataProvider); |
| 70 }; | 70 }; |
| 71 | 71 |
| 72 } // namespace device | 72 } // namespace content |
| 73 | 73 |
| 74 #endif // DEVICE_GEOLOCATION_WIFI_DATA_PROVIDER_H_ | 74 #endif // CONTENT_BROWSER_GEOLOCATION_WIFI_DATA_PROVIDER_H_ |
| OLD | NEW |