Roll src/third_party/WebKit 8b42d1d:744641d (svn 186770:186771)
[chromium-blink-merge.git] / chrome / browser / chromeos / bluetooth / bluetooth_pairing_dialog.h
bloba0439770ccd629f649bc1d200959fba512a38e66
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_
8 #include <string>
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"
15 namespace device {
16 class BluetoothDevice;
19 namespace chromeos {
21 // Bluetooth device pairing dialog shown form ash tray bubble.
22 class BluetoothPairingDialog : public ui::WebDialogDelegate {
23 public:
24 BluetoothPairingDialog(gfx::NativeWindow parent_window,
25 const device::BluetoothDevice* device);
26 virtual ~BluetoothPairingDialog();
28 void Show();
30 protected:
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;
47 private:
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_