| OLD | NEW |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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 CHROME_BROWSER_UI_BLUETOOTH_BLUETOOTH_CHOOSER_CONTROLLER_H_ | 5 #ifndef CHROME_BROWSER_UI_BLUETOOTH_BLUETOOTH_CHOOSER_CONTROLLER_H_ |
| 6 #define CHROME_BROWSER_UI_BLUETOOTH_BLUETOOTH_CHOOSER_CONTROLLER_H_ | 6 #define CHROME_BROWSER_UI_BLUETOOTH_BLUETOOTH_CHOOSER_CONTROLLER_H_ |
| 7 | 7 |
| 8 #include <stddef.h> | 8 #include <stddef.h> |
| 9 | 9 |
| 10 #include <string> | 10 #include <string> |
| (...skipping 30 matching lines...) Expand all Loading... |
| 41 | 41 |
| 42 // Update the state of the Bluetooth adapter. | 42 // Update the state of the Bluetooth adapter. |
| 43 void OnAdapterPresenceChanged( | 43 void OnAdapterPresenceChanged( |
| 44 content::BluetoothChooser::AdapterPresence presence); | 44 content::BluetoothChooser::AdapterPresence presence); |
| 45 | 45 |
| 46 // Update the Bluetooth discovery state and let the user know whether | 46 // Update the Bluetooth discovery state and let the user know whether |
| 47 // discovery is happening. | 47 // discovery is happening. |
| 48 void OnDiscoveryStateChanged(content::BluetoothChooser::DiscoveryState state); | 48 void OnDiscoveryStateChanged(content::BluetoothChooser::DiscoveryState state); |
| 49 | 49 |
| 50 // Shows a new device in the chooser or updates its information. | 50 // Shows a new device in the chooser or updates its information. |
| 51 // TODO(ortuno): Update device's name if necessary. | |
| 52 // https://crbug.com/634366 | |
| 53 void AddOrUpdateDevice(const std::string& device_id, | 51 void AddOrUpdateDevice(const std::string& device_id, |
| 54 bool should_update_name, | 52 bool should_update_name, |
| 55 const base::string16& device_name, | 53 const base::string16& device_name, |
| 56 bool is_gatt_connected, | 54 bool is_gatt_connected, |
| 57 bool is_paired, | 55 bool is_paired, |
| 58 const int8_t* rssi); | 56 const int8_t* rssi); |
| 59 | 57 |
| 60 // Tells the chooser that a device is no longer available. | 58 // Tells the chooser that a device is no longer available. |
| 61 void RemoveDevice(const std::string& device_id); | 59 void RemoveDevice(const std::string& device_id); |
| 62 | 60 |
| (...skipping 12 matching lines...) Expand all Loading... |
| 75 std::unordered_map<base::string16, int> device_name_map_; | 73 std::unordered_map<base::string16, int> device_name_map_; |
| 76 | 74 |
| 77 content::BluetoothChooser::EventHandler event_handler_; | 75 content::BluetoothChooser::EventHandler event_handler_; |
| 78 base::string16 no_devices_text_; | 76 base::string16 no_devices_text_; |
| 79 base::string16 status_text_; | 77 base::string16 status_text_; |
| 80 | 78 |
| 81 DISALLOW_COPY_AND_ASSIGN(BluetoothChooserController); | 79 DISALLOW_COPY_AND_ASSIGN(BluetoothChooserController); |
| 82 }; | 80 }; |
| 83 | 81 |
| 84 #endif // CHROME_BROWSER_UI_BLUETOOTH_BLUETOOTH_CHOOSER_CONTROLLER_H_ | 82 #endif // CHROME_BROWSER_UI_BLUETOOTH_BLUETOOTH_CHOOSER_CONTROLLER_H_ |
| OLD | NEW |