Chromium Code Reviews| 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 DEVICE_BLUETOOTH_BLUETOOTH_TASK_MANAGER_WIN_H_ | 5 #ifndef DEVICE_BLUETOOTH_BLUETOOTH_TASK_MANAGER_WIN_H_ |
| 6 #define DEVICE_BLUETOOTH_BLUETOOTH_TASK_MANAGER_WIN_H_ | 6 #define DEVICE_BLUETOOTH_BLUETOOTH_TASK_MANAGER_WIN_H_ |
| 7 | 7 |
| 8 #include <string> | 8 #include <string> |
| 9 #include <vector> | 9 #include <vector> |
| 10 | 10 |
| (...skipping 98 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 109 void PostStopDiscoveryTask(); | 109 void PostStopDiscoveryTask(); |
| 110 | 110 |
| 111 private: | 111 private: |
| 112 friend class base::RefCountedThreadSafe<BluetoothTaskManagerWin>; | 112 friend class base::RefCountedThreadSafe<BluetoothTaskManagerWin>; |
| 113 friend class BluetoothTaskManagerWinTest; | 113 friend class BluetoothTaskManagerWinTest; |
| 114 | 114 |
| 115 static const int kPollIntervalMs; | 115 static const int kPollIntervalMs; |
| 116 | 116 |
| 117 virtual ~BluetoothTaskManagerWin(); | 117 virtual ~BluetoothTaskManagerWin(); |
| 118 | 118 |
| 119 // Logs Win32 errors occuring during polling on the worker thread. The method | 119 // Logs Win32 errors occurring during polling on the worker thread. The method |
| 120 // may discards messages to avoid logging being too verbose. | 120 // may discards messages to avoid logging being too verbose. |
|
armansito
2014/10/28 05:28:28
nit: s/discards/discard/
Ben Chan
2014/10/28 05:33:24
Done.
| |
| 121 void LogPollingError(const char* message, int win32_error); | 121 void LogPollingError(const char* message, int win32_error); |
| 122 | 122 |
| 123 // Notify all Observers of updated AdapterState. Should only be called on the | 123 // Notify all Observers of updated AdapterState. Should only be called on the |
| 124 // UI thread. | 124 // UI thread. |
| 125 void OnAdapterStateChanged(const AdapterState* state); | 125 void OnAdapterStateChanged(const AdapterState* state); |
| 126 void OnDiscoveryStarted(bool success); | 126 void OnDiscoveryStarted(bool success); |
| 127 void OnDiscoveryStopped(); | 127 void OnDiscoveryStopped(); |
| 128 void OnDevicesPolled(const ScopedVector<DeviceState>* devices); | 128 void OnDevicesPolled(const ScopedVector<DeviceState>* devices); |
| 129 | 129 |
| 130 // Called on BluetoothTaskRunner. | 130 // Called on BluetoothTaskRunner. |
| (...skipping 79 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 210 // Use for discarding too many log messages. | 210 // Use for discarding too many log messages. |
| 211 base::TimeTicks current_logging_batch_ticks_; | 211 base::TimeTicks current_logging_batch_ticks_; |
| 212 int current_logging_batch_count_; | 212 int current_logging_batch_count_; |
| 213 | 213 |
| 214 DISALLOW_COPY_AND_ASSIGN(BluetoothTaskManagerWin); | 214 DISALLOW_COPY_AND_ASSIGN(BluetoothTaskManagerWin); |
| 215 }; | 215 }; |
| 216 | 216 |
| 217 } // namespace device | 217 } // namespace device |
| 218 | 218 |
| 219 #endif // DEVICE_BLUETOOTH_BLUETOOTH_TASK_MANAGER_WIN_H_ | 219 #endif // DEVICE_BLUETOOTH_BLUETOOTH_TASK_MANAGER_WIN_H_ |
| OLD | NEW |