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

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

Issue 1784333002: Add Device Policy Handler for Bluetooth, and allow disabling the Bluetooth adapter on Chrome OS (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: removed IsDisabled for now, added conditional compilation (cros only) Created 4 years, 8 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 | « chrome/chrome_browser_chromeos.gypi ('k') | device/bluetooth/bluetooth_adapter.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 (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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_H_ 5 #ifndef DEVICE_BLUETOOTH_BLUETOOTH_ADAPTER_H_
6 #define DEVICE_BLUETOOTH_BLUETOOTH_ADAPTER_H_ 6 #define DEVICE_BLUETOOTH_BLUETOOTH_ADAPTER_H_
7 7
8 #include <stdint.h> 8 #include <stdint.h>
9 9
10 #include <list> 10 #include <list>
(...skipping 242 matching lines...) Expand 10 before | Expand all | Expand 10 after
253 const ErrorCallback& error_callback) = 0; 253 const ErrorCallback& error_callback) = 0;
254 254
255 // Indicates whether the adapter is initialized and ready to use. 255 // Indicates whether the adapter is initialized and ready to use.
256 virtual bool IsInitialized() const = 0; 256 virtual bool IsInitialized() const = 0;
257 257
258 // Indicates whether the adapter is actually present on the system. For the 258 // Indicates whether the adapter is actually present on the system. For the
259 // default adapter, this indicates whether any adapter is present. An adapter 259 // default adapter, this indicates whether any adapter is present. An adapter
260 // is only considered present if the address has been obtained. 260 // is only considered present if the address has been obtained.
261 virtual bool IsPresent() const = 0; 261 virtual bool IsPresent() const = 0;
262 262
263 #if defined(OS_CHROMEOS)
264 // Disables Bluetooth completely without shutting it down.
265 virtual void SetDisabled(bool disabled);
scheib 2016/04/11 23:27:11 Make pure virtual so that we know this is implemen
Ivan Šandrk 2016/04/12 17:31:11 Done.
266 #endif
267
263 // Indicates whether the adapter radio is powered. 268 // Indicates whether the adapter radio is powered.
264 virtual bool IsPowered() const = 0; 269 virtual bool IsPowered() const = 0;
265 270
266 // Requests a change to the adapter radio power. Setting |powered| to true 271 // Requests a change to the adapter radio power. Setting |powered| to true
267 // will turn on the radio and false will turn it off. On success, |callback| 272 // will turn on the radio and false will turn it off. On success, |callback|
268 // will be called. On failure, |error_callback| will be called. 273 // will be called. On failure, |error_callback| will be called.
269 virtual void SetPowered(bool powered, 274 virtual void SetPowered(bool powered,
270 const base::Closure& callback, 275 const base::Closure& callback,
271 const ErrorCallback& error_callback) = 0; 276 const ErrorCallback& error_callback) = 0;
272 277
(...skipping 275 matching lines...) Expand 10 before | Expand all | Expand 10 after
548 std::set<BluetoothDiscoverySession*> discovery_sessions_; 553 std::set<BluetoothDiscoverySession*> discovery_sessions_;
549 554
550 // Note: This should remain the last member so it'll be destroyed and 555 // Note: This should remain the last member so it'll be destroyed and
551 // invalidate its weak pointers before any other members are destroyed. 556 // invalidate its weak pointers before any other members are destroyed.
552 base::WeakPtrFactory<BluetoothAdapter> weak_ptr_factory_; 557 base::WeakPtrFactory<BluetoothAdapter> weak_ptr_factory_;
553 }; 558 };
554 559
555 } // namespace device 560 } // namespace device
556 561
557 #endif // DEVICE_BLUETOOTH_BLUETOOTH_ADAPTER_H_ 562 #endif // DEVICE_BLUETOOTH_BLUETOOTH_ADAPTER_H_
OLDNEW
« no previous file with comments | « chrome/chrome_browser_chromeos.gypi ('k') | device/bluetooth/bluetooth_adapter.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698