Chromium Code Reviews| Index: device/bluetooth/bluetooth_adapter_factory.h |
| diff --git a/device/bluetooth/bluetooth_adapter_factory.h b/device/bluetooth/bluetooth_adapter_factory.h |
| index f2203aa7cbc6f5296abc24503370727ea775896b..87b0f1a53c945edd0a99dda303c149d44d0f20db 100644 |
| --- a/device/bluetooth/bluetooth_adapter_factory.h |
| +++ b/device/bluetooth/bluetooth_adapter_factory.h |
| @@ -18,18 +18,21 @@ namespace device { |
| // adapter" which may change depending on availability. |
| class BluetoothAdapterFactory { |
| public: |
| + typedef base::Callback<void(scoped_refptr<BluetoothAdapter> adapter)> |
| + AdapterCallback; |
|
keybuk
2013/01/22 18:40:57
newline afer this?
youngki
2013/01/22 20:38:13
Done.
|
| // Returns true if the Bluetooth adapter is available for the current |
| // platform. |
| static bool IsBluetoothAdapterAvailable(); |
| // Runs the callback with the shared instance for the default adapter when the |
| // adapter is available to be used. |
| - static void RunCallbackOnAdapterReady( |
| - const BluetoothAdapter::AdapterCallback& callback); |
| + // Use this method to get an adapter fully initialized. |
| + static void GetAdapter(const AdapterCallback& callback); |
|
keybuk
2013/01/22 18:40:57
Better comment would be something like:
Returns t
youngki
2013/01/22 20:38:13
Done.
|
| - // Returns the shared instance of the adapter that has already been created. |
| + // Returns the shared instance of the adapter that has already been created, |
| + // but may or may not have been initialized. |
| // It returns NULL if no adapter has been created at the time. |
| - static scoped_refptr<BluetoothAdapter> GetAdapter(); |
| + static scoped_refptr<BluetoothAdapter> MaybeGetAdapter(); |
| // Creates an instance for a specific adapter at address |address|. |
| static BluetoothAdapter* Create(const std::string& address); |