OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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_UI_WEBUI_CHROMEOS_MOBILE_SETUP_DIALOG_H_ | 5 #ifndef CHROME_BROWSER_UI_WEBUI_CHROMEOS_MOBILE_SETUP_DIALOG_H_ |
6 #define CHROME_BROWSER_UI_WEBUI_CHROMEOS_MOBILE_SETUP_DIALOG_H_ | 6 #define CHROME_BROWSER_UI_WEBUI_CHROMEOS_MOBILE_SETUP_DIALOG_H_ |
7 #pragma once | 7 #pragma once |
8 | 8 |
9 #include <vector> | 9 #include <vector> |
10 | 10 |
11 #include "base/memory/singleton.h" | 11 #include "base/memory/singleton.h" |
12 #include "chrome/browser/ui/webui/html_dialog_ui.h" | 12 #include "chrome/browser/ui/webui/html_dialog_ui.h" |
13 | 13 |
14 class MobileSetupDialog : public HtmlDialogUIDelegate { | 14 class MobileSetupDialog { |
15 public: | 15 public: |
16 MobileSetupDialog(); | |
17 | |
18 static void Show(); | 16 static void Show(); |
19 static MobileSetupDialog* GetInstance(); | |
20 | |
21 protected: | |
22 friend struct DefaultSingletonTraits<MobileSetupDialog>; | |
23 virtual ~MobileSetupDialog(); | |
24 | |
25 void OnCloseDialog(); | |
26 | |
27 // HtmlDialogUIDelegate overrides. | |
28 virtual bool IsDialogModal() const OVERRIDE; | |
29 virtual string16 GetDialogTitle() const OVERRIDE; | |
30 virtual GURL GetDialogContentURL() const OVERRIDE; | |
31 virtual void GetWebUIMessageHandlers( | |
32 std::vector<WebUIMessageHandler*>* handlers) const OVERRIDE; | |
33 virtual void GetDialogSize(gfx::Size* size) const OVERRIDE; | |
34 virtual std::string GetDialogArgs() const OVERRIDE; | |
35 virtual void OnDialogClosed(const std::string& json_retval) OVERRIDE; | |
36 virtual void OnCloseContents(TabContents* source, | |
37 bool* out_close_dialog) OVERRIDE; | |
38 virtual bool ShouldShowDialogTitle() const OVERRIDE; | |
39 virtual bool HandleContextMenu(const ContextMenuParams& params) OVERRIDE; | |
40 | 17 |
41 private: | 18 private: |
42 void ShowDialog(); | |
43 | |
44 DISALLOW_COPY_AND_ASSIGN(MobileSetupDialog); | 19 DISALLOW_COPY_AND_ASSIGN(MobileSetupDialog); |
45 }; | 20 }; |
46 | 21 |
47 #endif // CHROME_BROWSER_UI_WEBUI_CHROMEOS_MOBILE_SETUP_DIALOG_H_ | 22 #endif // CHROME_BROWSER_UI_WEBUI_CHROMEOS_MOBILE_SETUP_DIALOG_H_ |
OLD | NEW |