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 virtual ~BluetoothPairingDialog();
31 // ui::WebDialogDelegate implementation.
32 virtual ui::ModalType
GetDialogModalType() const OVERRIDE
;
33 virtual base::string16
GetDialogTitle() const OVERRIDE
;
34 virtual GURL
GetDialogContentURL() const OVERRIDE
;
35 virtual void GetWebUIMessageHandlers(
36 std::vector
<content::WebUIMessageHandler
*>* handlers
) const OVERRIDE
;
37 virtual void GetDialogSize(gfx::Size
* size
) const OVERRIDE
;
38 virtual std::string
GetDialogArgs() const OVERRIDE
;
39 // NOTE: This function deletes this object at the end.
40 virtual void OnDialogClosed(const std::string
& json_retval
) OVERRIDE
;
41 virtual void OnCloseContents(
42 content::WebContents
* source
, bool* out_close_dialog
) OVERRIDE
;
43 virtual bool ShouldShowDialogTitle() const OVERRIDE
;
44 virtual bool HandleContextMenu(
45 const content::ContextMenuParams
& params
) OVERRIDE
;
48 gfx::NativeWindow parent_window_
;
49 base::DictionaryValue device_data_
;
51 DISALLOW_COPY_AND_ASSIGN(BluetoothPairingDialog
);
54 } // namespace chromeos
56 #endif // CHROME_BROWSER_CHROMEOS_BLUETOOTH_BLUETOOTH_PAIRING_DIALOG_H_