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

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

Issue 1353053002: Handle RESCAN events from the Bluetooth chooser by starting or extending a discovery session. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@lkcr
Patch Set: Sync Created 5 years, 2 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_dispatcher_host.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 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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_DISPATCHER_HOST_H_ 5 #ifndef CONTENT_BROWSER_BLUETOOTH_BLUETOOTH_DISPATCHER_HOST_H_
6 #define CONTENT_BROWSER_BLUETOOTH_BLUETOOTH_DISPATCHER_HOST_H_ 6 #define CONTENT_BROWSER_BLUETOOTH_BLUETOOTH_DISPATCHER_HOST_H_
7 7
8 #include "base/basictypes.h" 8 #include "base/basictypes.h"
9 #include "base/id_map.h" 9 #include "base/id_map.h"
10 #include "base/memory/weak_ptr.h" 10 #include "base/memory/weak_ptr.h"
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after
52 private: 52 private:
53 friend class base::DeleteHelper<BluetoothDispatcherHost>; 53 friend class base::DeleteHelper<BluetoothDispatcherHost>;
54 friend struct BrowserThread::DeleteOnThread<BrowserThread::UI>; 54 friend struct BrowserThread::DeleteOnThread<BrowserThread::UI>;
55 55
56 struct RequestDeviceSession; 56 struct RequestDeviceSession;
57 57
58 // Set |adapter_| to a BluetoothAdapter instance and register observers, 58 // Set |adapter_| to a BluetoothAdapter instance and register observers,
59 // releasing references to previous |adapter_|. 59 // releasing references to previous |adapter_|.
60 void set_adapter(scoped_refptr<device::BluetoothAdapter> adapter); 60 void set_adapter(scoped_refptr<device::BluetoothAdapter> adapter);
61 61
62 // Makes sure a BluetoothDiscoverySession is active for |session|, and resets
63 // its timeout.
64 void StartDeviceDiscovery(RequestDeviceSession* session, int chooser_id);
65
62 // Stops all BluetoothDiscoverySessions being run for requestDevice() 66 // Stops all BluetoothDiscoverySessions being run for requestDevice()
63 // choosers. 67 // choosers.
64 void StopDeviceDiscovery(); 68 void StopDeviceDiscovery();
65 69
66 // BluetoothAdapter::Observer: 70 // BluetoothAdapter::Observer:
67 void AdapterPoweredChanged(device::BluetoothAdapter* adapter, 71 void AdapterPoweredChanged(device::BluetoothAdapter* adapter,
68 bool powered) override; 72 bool powered) override;
69 void DeviceAdded(device::BluetoothAdapter* adapter, 73 void DeviceAdded(device::BluetoothAdapter* adapter,
70 device::BluetoothDevice* device) override; 74 device::BluetoothDevice* device) override;
71 void DeviceRemoved(device::BluetoothAdapter* adapter, 75 void DeviceRemoved(device::BluetoothAdapter* adapter,
(...skipping 113 matching lines...) Expand 10 before | Expand all | Expand 10 after
185 189
186 // Must be last member, see base/memory/weak_ptr.h documentation 190 // Must be last member, see base/memory/weak_ptr.h documentation
187 base::WeakPtrFactory<BluetoothDispatcherHost> weak_ptr_factory_; 191 base::WeakPtrFactory<BluetoothDispatcherHost> weak_ptr_factory_;
188 192
189 DISALLOW_COPY_AND_ASSIGN(BluetoothDispatcherHost); 193 DISALLOW_COPY_AND_ASSIGN(BluetoothDispatcherHost);
190 }; 194 };
191 195
192 } // namespace content 196 } // namespace content
193 197
194 #endif // CONTENT_BROWSER_BLUETOOTH_BLUETOOTH_DISPATCHER_HOST_H_ 198 #endif // CONTENT_BROWSER_BLUETOOTH_BLUETOOTH_DISPATCHER_HOST_H_
OLDNEW
« no previous file with comments | « no previous file | content/browser/bluetooth/bluetooth_dispatcher_host.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698