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

Unified Diff: chrome/browser/chromeos/bluetooth/bluetooth_pairing_view.cc

Issue 2684793004: [Harmony] Harmonize Bluetooth dialogs. (Closed)
Patch Set: . Created 3 years, 10 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/chromeos/bluetooth/bluetooth_pairing_view.cc
diff --git a/chrome/browser/chromeos/bluetooth/bluetooth_pairing_view.cc b/chrome/browser/chromeos/bluetooth/bluetooth_pairing_view.cc
new file mode 100644
index 0000000000000000000000000000000000000000..3024021c2b986b53c217d1c993a06f6de24065ae
--- /dev/null
+++ b/chrome/browser/chromeos/bluetooth/bluetooth_pairing_view.cc
@@ -0,0 +1,32 @@
+// Copyright 2017 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.
+
+#include "chrome/browser/chromeos/bluetooth/bluetooth_pairing_view.h"
+
+#include "chrome/browser/chromeos/bluetooth/bluetooth_pairing_dialog.h"
+#include "chrome/browser/ui/webui/chrome_web_contents_handler.h"
+#include "ui/views/widget/widget.h"
+#include "ui/web_dialogs/web_dialog_delegate.h"
+
+namespace chromeos {
+
+BluetoothPairingView::BluetoothPairingView(content::BrowserContext* context,
+ ui::WebDialogDelegate* delegate,
+ WebContentsHandler* handler)
+ : views::WebDialogView(context, delegate, handler) {}
+
+BluetoothPairingView::~BluetoothPairingView() {}
+
+// static
+void BluetoothPairingView::ShowDialog(int container_id,
+ content::BrowserContext* context,
+ WebContentsHandler* handler,
+ const device::BluetoothDevice* device) {
+ BluetoothPairingDialog* dialog = new BluetoothPairingDialog(device);
James Cook 2017/02/09 15:18:02 nit: document ownership (since you're using raw ne
+ BluetoothPairingView* view =
+ new BluetoothPairingView(context, dialog, handler);
+ dialog->ShowInContainer(container_id, view);
+}
+
+} // namespace chromeos

Powered by Google App Engine
This is Rietveld 408576698