1 // Copyright (c) 2012 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.
5 #ifndef CHROME_BROWSER_CHROMEOS_BLUETOOTH_BLUETOOTH_PAIRING_DIALOG_H_
6 #define CHROME_BROWSER_CHROMEOS_BLUETOOTH_BLUETOOTH_PAIRING_DIALOG_H_
10 #include "base/compiler_specific.h"
11 #include "base/values.h"
12 #include "ui/gfx/native_widget_types.h"
13 #include "ui/web_dialogs/web_dialog_delegate.h"
16 class BluetoothDevice
;
21 // Bluetooth device pairing dialog shown form ash tray bubble.
22 class BluetoothPairingDialog
: public ui::WebDialogDelegate
{
24 BluetoothPairingDialog(gfx::NativeWindow parent_window
,
25 const device::BluetoothDevice
* device
);
26 ~BluetoothPairingDialog() override
;
31 // ui::WebDialogDelegate implementation.
32 ui::ModalType
GetDialogModalType() const override
;
33 base::string16
GetDialogTitle() const override
;
34 GURL
GetDialogContentURL() const override
;
35 void GetWebUIMessageHandlers(
36 std::vector
<content::WebUIMessageHandler
*>* handlers
) const override
;
37 void GetDialogSize(gfx::Size
* size
) const override
;
38 std::string
GetDialogArgs() const override
;
39 // NOTE: This function deletes this object at the end.
40 void OnDialogClosed(const std::string
& json_retval
) override
;
41 void OnCloseContents(content::WebContents
* source
,
42 bool* out_close_dialog
) override
;
43 bool ShouldShowDialogTitle() const override
;
44 bool HandleContextMenu(const content::ContextMenuParams
& params
) override
;
47 gfx::NativeWindow parent_window_
;
48 base::DictionaryValue device_data_
;
50 DISALLOW_COPY_AND_ASSIGN(BluetoothPairingDialog
);
53 } // namespace chromeos
55 #endif // CHROME_BROWSER_CHROMEOS_BLUETOOTH_BLUETOOTH_PAIRING_DIALOG_H_