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_CHOOSE_MOBILE_NETWORK_DIALOG_H_ | 5 #ifndef CHROME_BROWSER_CHROMEOS_CHOOSE_MOBILE_NETWORK_DIALOG_H_ |
6 #define CHROME_BROWSER_CHROMEOS_CHOOSE_MOBILE_NETWORK_DIALOG_H_ | 6 #define CHROME_BROWSER_CHROMEOS_CHOOSE_MOBILE_NETWORK_DIALOG_H_ |
7 | 7 |
8 #include "chrome/browser/ui/webui/html_dialog_ui.h" | 8 #include "chrome/browser/ui/webui/web_dialog_ui.h" |
9 #include "ui/gfx/native_widget_types.h" | 9 #include "ui/gfx/native_widget_types.h" |
10 | 10 |
11 namespace chromeos { | 11 namespace chromeos { |
12 | 12 |
13 // Dialog for manual selection of cellular network. | 13 // Dialog for manual selection of cellular network. |
14 class ChooseMobileNetworkDialog : private HtmlDialogUIDelegate { | 14 class ChooseMobileNetworkDialog : public WebDialogDelegate { |
15 public: | 15 public: |
16 // Shows the dialog box. | 16 // Shows the dialog box. |
17 static void ShowDialog(gfx::NativeWindow owning_window); | 17 static void ShowDialog(gfx::NativeWindow owning_window); |
18 | 18 |
19 private: | 19 private: |
20 ChooseMobileNetworkDialog(); | 20 ChooseMobileNetworkDialog(); |
21 | 21 |
22 // Overridden from HtmlDialogUI::Delegate: | 22 // Overridden from WebDialogDelegate: |
23 virtual ui::ModalType GetDialogModalType() const OVERRIDE; | 23 virtual ui::ModalType GetDialogModalType() const OVERRIDE; |
24 virtual string16 GetDialogTitle() const OVERRIDE; | 24 virtual string16 GetDialogTitle() const OVERRIDE; |
25 virtual GURL GetDialogContentURL() const OVERRIDE; | 25 virtual GURL GetDialogContentURL() const OVERRIDE; |
26 virtual void GetWebUIMessageHandlers( | 26 virtual void GetWebUIMessageHandlers( |
27 std::vector<content::WebUIMessageHandler*>* handlers) const OVERRIDE; | 27 std::vector<content::WebUIMessageHandler*>* handlers) const OVERRIDE; |
28 virtual void GetDialogSize(gfx::Size* size) const OVERRIDE; | 28 virtual void GetDialogSize(gfx::Size* size) const OVERRIDE; |
29 virtual std::string GetDialogArgs() const OVERRIDE; | 29 virtual std::string GetDialogArgs() const OVERRIDE; |
30 virtual void OnDialogClosed(const std::string& json_retval) OVERRIDE; | 30 virtual void OnDialogClosed(const std::string& json_retval) OVERRIDE; |
31 virtual void OnCloseContents( | 31 virtual void OnCloseContents( |
32 content::WebContents* source, bool* out_close_dialog) OVERRIDE; | 32 content::WebContents* source, bool* out_close_dialog) OVERRIDE; |
33 virtual bool ShouldShowDialogTitle() const OVERRIDE; | 33 virtual bool ShouldShowDialogTitle() const OVERRIDE; |
34 virtual bool HandleContextMenu( | 34 virtual bool HandleContextMenu( |
35 const content::ContextMenuParams& params) OVERRIDE; | 35 const content::ContextMenuParams& params) OVERRIDE; |
36 | 36 |
37 DISALLOW_COPY_AND_ASSIGN(ChooseMobileNetworkDialog); | 37 DISALLOW_COPY_AND_ASSIGN(ChooseMobileNetworkDialog); |
38 }; | 38 }; |
39 | 39 |
40 } // namespace chromeos | 40 } // namespace chromeos |
41 | 41 |
42 #endif // CHROME_BROWSER_CHROMEOS_CHOOSE_MOBILE_NETWORK_DIALOG_H_ | 42 #endif // CHROME_BROWSER_CHROMEOS_CHOOSE_MOBILE_NETWORK_DIALOG_H_ |
OLD | NEW |