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

Side by Side Diff: device/bluetooth/bluetooth_adapter_android.h

Issue 1842223003: Remove outdated devices from Android device chooser (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Reverted two small unnecessary changes. 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 | « device/bluetooth/bluetooth_adapter.cc ('k') | device/bluetooth/bluetooth_adapter_android.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 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 DEVICE_BLUETOOTH_BLUETOOTH_ADAPTER_ANDROID_H_ 5 #ifndef DEVICE_BLUETOOTH_BLUETOOTH_ADAPTER_ANDROID_H_
6 #define DEVICE_BLUETOOTH_BLUETOOTH_ADAPTER_ANDROID_H_ 6 #define DEVICE_BLUETOOTH_BLUETOOTH_ADAPTER_ANDROID_H_
7 7
8 #include <memory> 8 #include <memory>
9 9
10 #include "base/android/jni_android.h" 10 #include "base/android/jni_android.h"
(...skipping 110 matching lines...) Expand 10 before | Expand all | Expand 10 after
121 BluetoothDiscoveryFilter* discovery_filter, 121 BluetoothDiscoveryFilter* discovery_filter,
122 const base::Closure& callback, 122 const base::Closure& callback,
123 const DiscoverySessionErrorCallback& error_callback) override; 123 const DiscoverySessionErrorCallback& error_callback) override;
124 void SetDiscoveryFilter( 124 void SetDiscoveryFilter(
125 std::unique_ptr<BluetoothDiscoveryFilter> discovery_filter, 125 std::unique_ptr<BluetoothDiscoveryFilter> discovery_filter,
126 const base::Closure& callback, 126 const base::Closure& callback,
127 const DiscoverySessionErrorCallback& error_callback) override; 127 const DiscoverySessionErrorCallback& error_callback) override;
128 void RemovePairingDelegateInternal( 128 void RemovePairingDelegateInternal(
129 BluetoothDevice::PairingDelegate* pairing_delegate) override; 129 BluetoothDevice::PairingDelegate* pairing_delegate) override;
130 130
131 void PurgeTimedOutDevices();
132
133 scoped_refptr<base::SequencedTaskRunner> ui_task_runner_;
134
131 // Java object org.chromium.device.bluetooth.ChromeBluetoothAdapter. 135 // Java object org.chromium.device.bluetooth.ChromeBluetoothAdapter.
132 base::android::ScopedJavaGlobalRef<jobject> j_adapter_; 136 base::android::ScopedJavaGlobalRef<jobject> j_adapter_;
133 137
138 private:
139 size_t num_discovery_sessions_ = 0;
140
134 // 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
135 // invalidate its weak pointers before any other members are destroyed. 142 // invalidate its weak pointers before any other members are destroyed.
136 base::WeakPtrFactory<BluetoothAdapterAndroid> weak_ptr_factory_; 143 base::WeakPtrFactory<BluetoothAdapterAndroid> weak_ptr_factory_;
137 144
138 DISALLOW_COPY_AND_ASSIGN(BluetoothAdapterAndroid); 145 DISALLOW_COPY_AND_ASSIGN(BluetoothAdapterAndroid);
139 }; 146 };
140 147
141 } // namespace device 148 } // namespace device
142 149
143 #endif // DEVICE_BLUETOOTH_BLUETOOTH_ADAPTER_ANDROID_H_ 150 #endif // DEVICE_BLUETOOTH_BLUETOOTH_ADAPTER_ANDROID_H_
OLDNEW
« no previous file with comments | « device/bluetooth/bluetooth_adapter.cc ('k') | device/bluetooth/bluetooth_adapter_android.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698