Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(65)

Side by Side Diff: content/public/browser/bluetooth_chooser.h

Issue 2210873003: bluetooth: Allow updates on chooser items. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@bluetooth-fix-advertised-services
Patch Set: Add comment about rssi Created 4 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 CONTENT_PUBLIC_BROWSER_BLUETOOTH_CHOOSER_H_ 5 #ifndef CONTENT_PUBLIC_BROWSER_BLUETOOTH_CHOOSER_H_
6 #define CONTENT_PUBLIC_BROWSER_BLUETOOTH_CHOOSER_H_ 6 #define CONTENT_PUBLIC_BROWSER_BLUETOOTH_CHOOSER_H_
7 7
8 #include <string> 8 #include <string>
9 9
10 #include "base/callback.h" 10 #include "base/callback.h"
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after
61 // Lets the chooser tell the user the state of the Bluetooth adapter. This 61 // Lets the chooser tell the user the state of the Bluetooth adapter. This
62 // defaults to POWERED_ON. 62 // defaults to POWERED_ON.
63 enum class AdapterPresence { ABSENT, POWERED_OFF, POWERED_ON }; 63 enum class AdapterPresence { ABSENT, POWERED_OFF, POWERED_ON };
64 virtual void SetAdapterPresence(AdapterPresence presence) {} 64 virtual void SetAdapterPresence(AdapterPresence presence) {}
65 65
66 // Lets the chooser tell the user whether discovery is happening. This 66 // Lets the chooser tell the user whether discovery is happening. This
67 // defaults to DISCOVERING. 67 // defaults to DISCOVERING.
68 enum class DiscoveryState { FAILED_TO_START, DISCOVERING, IDLE }; 68 enum class DiscoveryState { FAILED_TO_START, DISCOVERING, IDLE };
69 virtual void ShowDiscoveryState(DiscoveryState state) {} 69 virtual void ShowDiscoveryState(DiscoveryState state) {}
70 70
71 // Shows a new device in the chooser. 71 // Adds a new device to the chooser or updates the information of an existing
72 virtual void AddDevice(const std::string& device_id, 72 // device. Passing nullptr for |rssi| means that the device doesn't not have
73 const base::string16& device_name) {} 73 // RSSI which happens when the device is already connected.
74 virtual void AddOrUpdateDevice(const std::string& device_id,
75 bool should_update_name,
76 const base::string16& device_name,
77 bool is_gatt_connected,
78 bool is_paired,
79 int8_t* rssi) {}
juncai 2016/08/09 19:30:26 nit: maybe add const? const int8_t*
ortuno 2016/08/09 19:52:48 Done.
74 80
75 // Tells the chooser that a device is no longer available. The chooser should 81 // Tells the chooser that a device is no longer available. The chooser should
76 // not call DeviceSelected() for a device that's been removed. 82 // not call DeviceSelected() for a device that's been removed.
77 virtual void RemoveDevice(const std::string& device_id) {} 83 virtual void RemoveDevice(const std::string& device_id) {}
78 }; 84 };
79 85
80 } // namespace content 86 } // namespace content
81 87
82 #endif // CONTENT_PUBLIC_BROWSER_BLUETOOTH_CHOOSER_H_ 88 #endif // CONTENT_PUBLIC_BROWSER_BLUETOOTH_CHOOSER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698