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

Unified Diff: chrome/browser/ui/bluetooth/chrome_extension_bluetooth_chooser.h

Issue 2005443002: Implement bluetooth chooser for Chrome Apps on Mac (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@refactor_chooser_bubble_ui_cocoa
Patch Set: rebase and address comments 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 side-by-side diff with in-line comments
Download patch
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_

Powered by Google App Engine
This is Rietveld 408576698