OLD | NEW |
---|---|
(Empty) | |
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. | |
4 | |
5 #ifndef CHROME_BROWSER_UI_WEBUI_CHROMEOS_RETAIL_MODE_LOGOUT_DIALOG_H_ | |
6 #define CHROME_BROWSER_UI_WEBUI_CHROMEOS_RETAIL_MODE_LOGOUT_DIALOG_H_ | |
7 #pragma once | |
8 | |
9 #include <string> | |
10 #include <vector> | |
11 | |
12 #include "base/memory/scoped_ptr.h" | |
13 #include "base/string16.h" | |
14 #include "base/values.h" | |
15 #include "chrome/browser/ui/webui/html_dialog_ui.h" | |
16 #include "content/public/browser/web_ui_message_handler.h" | |
Evan Stade
2012/01/27 06:54:46
you don't need to include this one, you can forwar
rkc
2012/02/08 02:52:19
Done.
| |
17 #include "ui/gfx/native_widget_types.h" | |
18 | |
Evan Stade
2012/01/27 06:54:46
remove \n
rkc
2012/02/08 02:52:19
Done.
| |
19 | |
20 class RetailModeLogoutDialogHandler; | |
21 | |
22 class RetailModeLogoutDialog : private HtmlDialogUIDelegate { | |
flackr
2012/01/27 07:48:04
Class comment.
rkc
2012/02/08 02:52:19
Done.
| |
23 public: | |
24 static void ShowRetailModeLogoutDialog(); | |
25 static void CloseRetailModeLogoutDialog(); | |
26 | |
27 private: | |
28 explicit RetailModeLogoutDialog(); | |
29 virtual ~RetailModeLogoutDialog(); | |
30 | |
31 void ShowDialog(); | |
32 void CloseDialog(); | |
33 | |
34 // HtmlDialogUIDelegate methods | |
35 virtual ui::ModalType GetDialogModalType() const OVERRIDE; | |
36 virtual string16 GetDialogTitle() const OVERRIDE; | |
37 virtual GURL GetDialogContentURL() const OVERRIDE; | |
38 virtual void GetWebUIMessageHandlers( | |
39 std::vector<content::WebUIMessageHandler*>* handlers) const OVERRIDE; | |
40 virtual void GetDialogSize(gfx::Size* size) const OVERRIDE; | |
41 virtual std::string GetDialogArgs() const OVERRIDE; | |
42 virtual void OnDialogClosed(const std::string& json_retval) OVERRIDE; | |
43 virtual void OnCloseContents(content::WebContents* source, | |
44 bool* out_close_dialog) OVERRIDE; | |
45 virtual bool ShouldShowDialogTitle() const OVERRIDE; | |
46 | |
47 content::WebContents* contents_; | |
48 RetailModeLogoutDialogHandler* handler_; | |
flackr
2012/01/27 07:48:04
Comments, including on ownership of pointer.
rkc
2012/02/08 02:52:19
This is a bit self evident. I haven't seen people
flackr
2012/02/08 21:23:44
It is self evident what the data member is, it may
| |
49 | |
50 DISALLOW_COPY_AND_ASSIGN(RetailModeLogoutDialog); | |
51 }; | |
52 | |
53 class RetailModeLogoutDialogUI : public HtmlDialogUI { | |
flackr
2012/01/27 07:48:04
Class comment.
rkc
2012/02/08 02:52:19
Ditto.
flackr
2012/02/08 21:23:44
http://google-styleguide.googlecode.com/svn/trunk/
| |
54 public: | |
55 explicit RetailModeLogoutDialogUI(content::WebUI* web_ui); | |
56 virtual ~RetailModeLogoutDialogUI() {} | |
57 | |
58 private: | |
59 DISALLOW_COPY_AND_ASSIGN(RetailModeLogoutDialogUI); | |
60 }; | |
61 | |
62 #endif // CHROME_BROWSER_UI_WEBUI_CHROMEOS_RETAIL_MODE_LOGOUT_DIALOG_H_ | |
OLD | NEW |