OLD | NEW |
(Empty) | |
| 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 |
| 3 // found in the LICENSE file. |
| 4 |
| 5 #ifndef CHROME_BROWSER_UI_BLUETOOTH_CHROME_EXTENSION_BLUETOOTH_CHOOSER_H_ |
| 6 #define CHROME_BROWSER_UI_BLUETOOTH_CHROME_EXTENSION_BLUETOOTH_CHOOSER_H_ |
| 7 |
| 8 #include <memory> |
| 9 |
| 10 #include "base/macros.h" |
| 11 #include "content/public/browser/bluetooth_chooser.h" |
| 12 |
| 13 class BluetoothChooserController; |
| 14 class ChromeExtensionChooserDialog; |
| 15 |
| 16 namespace content { |
| 17 class RenderFrameHost; |
| 18 } |
| 19 |
| 20 // Represents a Bluetooth chooser to ask the user to select a Bluetooth |
| 21 // device from a list of options. This implementation is for extensions. |
| 22 class ChromeExtensionBluetoothChooser : public content::BluetoothChooser { |
| 23 public: |
| 24 ChromeExtensionBluetoothChooser( |
| 25 content::RenderFrameHost* frame, |
| 26 const content::BluetoothChooser::EventHandler& event_handler); |
| 27 ~ChromeExtensionBluetoothChooser() override; |
| 28 |
| 29 // content::BluetoothChooser: |
| 30 void SetAdapterPresence(AdapterPresence presence) override; |
| 31 void ShowDiscoveryState(DiscoveryState state) override; |
| 32 void AddDevice(const std::string& device_id, |
| 33 const base::string16& device_name) override; |
| 34 void RemoveDevice(const std::string& device_id) override; |
| 35 |
| 36 private: |
| 37 std::unique_ptr<BluetoothChooserController> bluetooth_chooser_controller_; |
| 38 std::unique_ptr<ChromeExtensionChooserDialog> chooser_dialog_; |
| 39 |
| 40 DISALLOW_COPY_AND_ASSIGN(ChromeExtensionBluetoothChooser); |
| 41 }; |
| 42 |
| 43 #endif // CHROME_BROWSER_UI_BLUETOOTH_CHROME_EXTENSION_BLUETOOTH_CHOOSER_H_ |
OLD | NEW |