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

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: Rebased on master Created 4 years, 7 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 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 108 matching lines...) Expand 10 before | Expand all | Expand 10 after
119 BluetoothDiscoveryFilter* discovery_filter, 119 BluetoothDiscoveryFilter* discovery_filter,
120 const base::Closure& callback, 120 const base::Closure& callback,
121 const DiscoverySessionErrorCallback& error_callback) override; 121 const DiscoverySessionErrorCallback& error_callback) override;
122 void SetDiscoveryFilter( 122 void SetDiscoveryFilter(
123 std::unique_ptr<BluetoothDiscoveryFilter> discovery_filter, 123 std::unique_ptr<BluetoothDiscoveryFilter> discovery_filter,
124 const base::Closure& callback, 124 const base::Closure& callback,
125 const DiscoverySessionErrorCallback& error_callback) override; 125 const DiscoverySessionErrorCallback& error_callback) override;
126 void RemovePairingDelegateInternal( 126 void RemovePairingDelegateInternal(
127 BluetoothDevice::PairingDelegate* pairing_delegate) override; 127 BluetoothDevice::PairingDelegate* pairing_delegate) override;
128 128
129 void PurgeTimedOutDevices();
130
131 scoped_refptr<base::SequencedTaskRunner> ui_task_runner_;
132
129 // Java object org.chromium.device.bluetooth.ChromeBluetoothAdapter. 133 // Java object org.chromium.device.bluetooth.ChromeBluetoothAdapter.
130 base::android::ScopedJavaGlobalRef<jobject> j_adapter_; 134 base::android::ScopedJavaGlobalRef<jobject> j_adapter_;
131 135
132 // Note: This should remain the last member so it'll be destroyed and 136 // Note: This should remain the last member so it'll be destroyed and
133 // invalidate its weak pointers before any other members are destroyed. 137 // invalidate its weak pointers before any other members are destroyed.
134 base::WeakPtrFactory<BluetoothAdapterAndroid> weak_ptr_factory_; 138 base::WeakPtrFactory<BluetoothAdapterAndroid> weak_ptr_factory_;
135 139
136 DISALLOW_COPY_AND_ASSIGN(BluetoothAdapterAndroid); 140 DISALLOW_COPY_AND_ASSIGN(BluetoothAdapterAndroid);
137 }; 141 };
138 142
139 } // namespace device 143 } // namespace device
140 144
141 #endif // DEVICE_BLUETOOTH_BLUETOOTH_ADAPTER_ANDROID_H_ 145 #endif // DEVICE_BLUETOOTH_BLUETOOTH_ADAPTER_ANDROID_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698