Chromium Code Reviews| 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 |