Chromium Code Reviews| Index: chrome/browser/ui/bluetooth/chrome_extension_bluetooth_chooser.h |
| diff --git a/chrome/browser/ui/bluetooth/chrome_extension_bluetooth_chooser.h b/chrome/browser/ui/bluetooth/chrome_extension_bluetooth_chooser.h |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..27ddcb4f0ee4f3a0d2dfe92a9048480e3488477c |
| --- /dev/null |
| +++ b/chrome/browser/ui/bluetooth/chrome_extension_bluetooth_chooser.h |
| @@ -0,0 +1,43 @@ |
| +// Copyright 2016 The Chromium Authors. All rights reserved. |
| +// Use of this source code is governed by a BSD-style license that can be |
| +// found in the LICENSE file. |
| + |
| +#ifndef CHROME_BROWSER_UI_BLUETOOTH_CHROME_EXTENSION_BLUETOOTH_CHOOSER_H_ |
| +#define CHROME_BROWSER_UI_BLUETOOTH_CHROME_EXTENSION_BLUETOOTH_CHOOSER_H_ |
| + |
| +#include <memory> |
| + |
| +#include "base/macros.h" |
| +#include "content/public/browser/bluetooth_chooser.h" |
| + |
| +class BluetoothChooserController; |
| +class ChromeExtensionChooserDialog; |
| + |
| +namespace content { |
| +class RenderFrameHost; |
| +} |
| + |
| +// Represents a Bluetooth chooser to ask the user to select a Bluetooth |
| +// device from a list of options. This implementation is for extensions. |
| +class ChromeExtensionBluetoothChooser : public content::BluetoothChooser { |
|
Reilly Grant (use Gerrit)
2016/06/01 17:59:23
This seems to be a duplicate of BluetoothChooserDe
juncai
2016/06/01 21:15:47
Talked offline. The ChromeExtensionBluetoothChoose
|
| + public: |
| + ChromeExtensionBluetoothChooser( |
| + content::RenderFrameHost* frame, |
| + const content::BluetoothChooser::EventHandler& event_handler); |
| + ~ChromeExtensionBluetoothChooser() override; |
| + |
| + // content::BluetoothChooser: |
| + void SetAdapterPresence(AdapterPresence presence) override; |
| + void ShowDiscoveryState(DiscoveryState state) override; |
| + void AddDevice(const std::string& device_id, |
| + const base::string16& device_name) override; |
| + void RemoveDevice(const std::string& device_id) override; |
| + |
| + private: |
| + std::unique_ptr<BluetoothChooserController> bluetooth_chooser_controller_; |
| + std::unique_ptr<ChromeExtensionChooserDialog> chooser_dialog_; |
| + |
| + DISALLOW_COPY_AND_ASSIGN(ChromeExtensionBluetoothChooser); |
| +}; |
| + |
| +#endif // CHROME_BROWSER_UI_BLUETOOTH_CHROME_EXTENSION_BLUETOOTH_CHOOSER_H_ |