| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 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 | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #ifndef CHROME_BROWSER_CHROMEOS_BLUETOOTH_BLUETOOTH_PAIRING_DIALOG_H_ | 5 #ifndef CHROME_BROWSER_CHROMEOS_BLUETOOTH_BLUETOOTH_PAIRING_DIALOG_H_ |
| 6 #define CHROME_BROWSER_CHROMEOS_BLUETOOTH_BLUETOOTH_PAIRING_DIALOG_H_ | 6 #define CHROME_BROWSER_CHROMEOS_BLUETOOTH_BLUETOOTH_PAIRING_DIALOG_H_ |
| 7 | 7 |
| 8 #include "base/macros.h" | 8 #include "base/macros.h" |
| 9 #include "base/values.h" | 9 #include "base/values.h" |
| 10 #include "ui/web_dialogs/web_dialog_delegate.h" | 10 #include "ui/web_dialogs/web_dialog_delegate.h" |
| 11 | 11 |
| 12 namespace device { | 12 namespace device { |
| 13 class BluetoothDevice; | 13 class BluetoothDevice; |
| 14 } | 14 } |
| 15 | 15 |
| 16 namespace views { |
| 17 class WebDialogView; |
| 18 } |
| 19 |
| 16 namespace chromeos { | 20 namespace chromeos { |
| 17 | 21 |
| 18 // Bluetooth device pairing dialog shown from ash tray bubble. | 22 // Bluetooth device pairing dialog shown from ash tray bubble. |
| 19 class BluetoothPairingDialog : public ui::WebDialogDelegate { | 23 class BluetoothPairingDialog : public ui::WebDialogDelegate { |
| 20 public: | 24 public: |
| 21 explicit BluetoothPairingDialog(const device::BluetoothDevice* device); | 25 explicit BluetoothPairingDialog(const device::BluetoothDevice* device); |
| 22 ~BluetoothPairingDialog() override; | 26 ~BluetoothPairingDialog() override; |
| 23 | 27 |
| 24 // Shows the dialog in an ash window container (which must be a system modal | 28 // Shows the dialog in an ash window container (which must be a system modal |
| 25 // container) on the primary display. See ash/public/cpp/shell_window_ids.h. | 29 // container) on the primary display. See ash/public/cpp/shell_window_ids.h. |
| 26 void ShowInContainer(int container_id); | 30 void ShowInContainer(int container_id, views::WebDialogView* view); |
| 27 | 31 |
| 28 content::WebUI* GetWebUIForTest() { return webui_; } | 32 content::WebUI* GetWebUIForTest() { return webui_; } |
| 29 | 33 |
| 30 protected: | 34 protected: |
| 31 // ui::WebDialogDelegate implementation. | 35 // ui::WebDialogDelegate implementation. |
| 32 ui::ModalType GetDialogModalType() const override; | 36 ui::ModalType GetDialogModalType() const override; |
| 33 base::string16 GetDialogTitle() const override; | 37 base::string16 GetDialogTitle() const override; |
| 34 GURL GetDialogContentURL() const override; | 38 GURL GetDialogContentURL() const override; |
| 35 void GetWebUIMessageHandlers( | 39 void GetWebUIMessageHandlers( |
| 36 std::vector<content::WebUIMessageHandler*>* handlers) const override; | 40 std::vector<content::WebUIMessageHandler*>* handlers) const override; |
| (...skipping 11 matching lines...) Expand all Loading... |
| 48 private: | 52 private: |
| 49 base::DictionaryValue device_data_; | 53 base::DictionaryValue device_data_; |
| 50 content::WebUI* webui_; | 54 content::WebUI* webui_; |
| 51 | 55 |
| 52 DISALLOW_COPY_AND_ASSIGN(BluetoothPairingDialog); | 56 DISALLOW_COPY_AND_ASSIGN(BluetoothPairingDialog); |
| 53 }; | 57 }; |
| 54 | 58 |
| 55 } // namespace chromeos | 59 } // namespace chromeos |
| 56 | 60 |
| 57 #endif // CHROME_BROWSER_CHROMEOS_BLUETOOTH_BLUETOOTH_PAIRING_DIALOG_H_ | 61 #endif // CHROME_BROWSER_CHROMEOS_BLUETOOTH_BLUETOOTH_PAIRING_DIALOG_H_ |
| OLD | NEW |