Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(350)

Side by Side Diff: chrome/browser/ui/webui/chromeos/retail_mode_logout_dialog.h

Issue 9265026: Implement restart on Idle for Kiosk Mode. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Review comments. Created 8 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
(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 "ui/gfx/native_widget_types.h"
17
18 class RetailModeLogoutDialogHandler;
19
20 // A class to show the logout on idle dialog if the machine is in retail mode.
21 class RetailModeLogoutDialog : private HtmlDialogUIDelegate {
22 public:
23 static void ShowRetailModeLogoutDialog();
24 static void CloseRetailModeLogoutDialog();
25
26 private:
27 explicit RetailModeLogoutDialog();
28 virtual ~RetailModeLogoutDialog();
29
30 void ShowDialog();
31 void CloseDialog();
32
33 // HtmlDialogUIDelegate methods
34 virtual ui::ModalType GetDialogModalType() const OVERRIDE;
35 virtual string16 GetDialogTitle() const OVERRIDE;
36 virtual GURL GetDialogContentURL() const OVERRIDE;
37 virtual void GetWebUIMessageHandlers(
38 std::vector<content::WebUIMessageHandler*>* handlers) const OVERRIDE;
39 virtual void GetDialogSize(gfx::Size* size) const OVERRIDE;
40 virtual std::string GetDialogArgs() const OVERRIDE;
41 virtual void OnDialogClosed(const std::string& json_retval) OVERRIDE;
42 virtual void OnCloseContents(content::WebContents* source,
43 bool* out_close_dialog) OVERRIDE;
44 virtual bool ShouldShowDialogTitle() const OVERRIDE;
45
46 content::WebContents* contents_;
47 RetailModeLogoutDialogHandler* handler_;
48
49 DISALLOW_COPY_AND_ASSIGN(RetailModeLogoutDialog);
50 };
51
52 class RetailModeLogoutDialogUI : public HtmlDialogUI {
53 public:
54 explicit RetailModeLogoutDialogUI(content::WebUI* web_ui);
55 virtual ~RetailModeLogoutDialogUI() {}
56
57 private:
58 DISALLOW_COPY_AND_ASSIGN(RetailModeLogoutDialogUI);
59 };
60
61 #endif // CHROME_BROWSER_UI_WEBUI_CHROMEOS_RETAIL_MODE_LOGOUT_DIALOG_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698