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

Side by Side Diff: content/browser/bluetooth/bluetooth_device_chooser_controller.h

Issue 2217573002: bluetooth: Only add new devices, connected devices and devices that changed. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@bluetooth-add-or-update
Patch Set: Fix typo 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
« no previous file with comments | « no previous file | content/browser/bluetooth/bluetooth_device_chooser_controller.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 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_BROWSER_BLUETOOTH_BLUETOOTH_DEVICE_CHOOSER_CONTROLLER_H_ 5 #ifndef CONTENT_BROWSER_BLUETOOTH_BLUETOOTH_DEVICE_CHOOSER_CONTROLLER_H_
6 #define CONTENT_BROWSER_BLUETOOTH_BLUETOOTH_DEVICE_CHOOSER_CONTROLLER_H_ 6 #define CONTENT_BROWSER_BLUETOOTH_BLUETOOTH_DEVICE_CHOOSER_CONTROLLER_H_
7 7
8 #include <string> 8 #include <string>
9 9
10 #include "base/memory/weak_ptr.h" 10 #include "base/memory/weak_ptr.h"
(...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after
76 76
77 // Stops the current discovery session and notifies the chooser 77 // Stops the current discovery session and notifies the chooser
78 // that the adapter changed states. 78 // that the adapter changed states.
79 void AdapterPoweredChanged(bool powered); 79 void AdapterPoweredChanged(bool powered);
80 80
81 // After this method is called any new instance of 81 // After this method is called any new instance of
82 // BluetoothDeviceChooserController will have a scan duration of 0. 82 // BluetoothDeviceChooserController will have a scan duration of 0.
83 static void SetTestScanDurationForTesting(); 83 static void SetTestScanDurationForTesting();
84 84
85 private: 85 private:
86 // Populates the chooser with the devices that are already in the adapter. 86 // Populates the chooser with the GATT connected devices.
87 void PopulateFoundDevices(); 87 void PopulateConnectedDevices();
88 88
89 // Notifies the chooser that discovery is starting and starts a discovery 89 // Notifies the chooser that discovery is starting and starts a discovery
90 // session. 90 // session.
91 void StartDeviceDiscovery(); 91 void StartDeviceDiscovery();
92 92
93 // Stops the discovery session and notifies the chooser. 93 // Stops the discovery session and notifies the chooser.
94 void StopDeviceDiscovery(); 94 void StopDeviceDiscovery();
95 95
96 // StartDiscoverySessionWithFilter callbacks: 96 // StartDiscoverySessionWithFilter callbacks:
97 void OnStartDiscoverySessionSuccess( 97 void OnStartDiscoverySessionSuccess(
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after
145 // Weak pointer factory for generating 'this' pointers that might live longer 145 // Weak pointer factory for generating 'this' pointers that might live longer
146 // than we do. 146 // than we do.
147 // Note: This should remain the last member so it'll be destroyed and 147 // Note: This should remain the last member so it'll be destroyed and
148 // invalidate its weak pointers before any other members are destroyed. 148 // invalidate its weak pointers before any other members are destroyed.
149 base::WeakPtrFactory<BluetoothDeviceChooserController> weak_ptr_factory_; 149 base::WeakPtrFactory<BluetoothDeviceChooserController> weak_ptr_factory_;
150 }; 150 };
151 151
152 } // namespace content 152 } // namespace content
153 153
154 #endif // CONTENT_BROWSER_BLUETOOTH_BLUETOOTH_DEVICE_CHOOSER_CONTROLLER_H_ 154 #endif // CONTENT_BROWSER_BLUETOOTH_BLUETOOTH_DEVICE_CHOOSER_CONTROLLER_H_
OLDNEW
« no previous file with comments | « no previous file | content/browser/bluetooth/bluetooth_device_chooser_controller.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698