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

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

Issue 2026413002: bluetooth: Repopulate chooser with existing devices (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@my-origin
Patch Set: DCHECK chooser Created 4 years, 6 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 62 matching lines...) Expand 10 before | Expand all | Expand 10 after
73 73
74 // Adds a device to the chooser. Should only be called after GetDevice and 74 // Adds a device to the chooser. Should only be called after GetDevice and
75 // before either of the callbacks are run. 75 // before either of the callbacks are run.
76 void AddFilteredDevice(const device::BluetoothDevice& device); 76 void AddFilteredDevice(const device::BluetoothDevice& device);
77 77
78 // Stops the current discovery session and notifies the chooser 78 // Stops the current discovery session and notifies the chooser
79 // that the adapter changed states. 79 // that the adapter changed states.
80 void AdapterPoweredChanged(bool powered); 80 void AdapterPoweredChanged(bool powered);
81 81
82 private: 82 private:
83 // Populates the chooser with the devices that are already in the adapter.
84 void PopulateFoundDevices();
85
83 // Notifies the chooser that discovery is starting and starts a discovery 86 // Notifies the chooser that discovery is starting and starts a discovery
84 // session. 87 // session.
85 void StartDeviceDiscovery(); 88 void StartDeviceDiscovery();
86 89
87 // Stops the discovery session and notifies the chooser. 90 // Stops the discovery session and notifies the chooser.
88 void StopDeviceDiscovery(); 91 void StopDeviceDiscovery();
89 92
90 // StartDiscoverySessionWithFilter callbacks: 93 // StartDiscoverySessionWithFilter callbacks:
91 void OnStartDiscoverySessionSuccess( 94 void OnStartDiscoverySessionSuccess(
92 std::unique_ptr<device::BluetoothDiscoverySession> discovery_session); 95 std::unique_ptr<device::BluetoothDiscoverySession> discovery_session);
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after
136 // Weak pointer factory for generating 'this' pointers that might live longer 139 // Weak pointer factory for generating 'this' pointers that might live longer
137 // than we do. 140 // than we do.
138 // Note: This should remain the last member so it'll be destroyed and 141 // Note: This should remain the last member so it'll be destroyed and
139 // invalidate its weak pointers before any other members are destroyed. 142 // invalidate its weak pointers before any other members are destroyed.
140 base::WeakPtrFactory<BluetoothDeviceChooserController> weak_ptr_factory_; 143 base::WeakPtrFactory<BluetoothDeviceChooserController> weak_ptr_factory_;
141 }; 144 };
142 145
143 } // namespace content 146 } // namespace content
144 147
145 #endif // CONTENT_BROWSER_BLUETOOTH_BLUETOOTH_DEVICE_CHOOSER_CONTROLLER_H_ 148 #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