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

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

Issue 9568038: Implement the auto-logout on idle feature for Kiosk mode. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: . Created 8 years, 9 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_IDLE_LOGOUT_DIALOG_H_
6 #define CHROME_BROWSER_UI_WEBUI_CHROMEOS_IDLE_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 IdleLogoutDialogHandler;
19
20 // A class to show the logout on idle dialog if the machine is in retail mode.
21 class IdleLogoutDialog : private HtmlDialogUIDelegate {
22 public:
23 static void ShowIdleLogoutDialog();
24 static void CloseIdleLogoutDialog();
25
26 private:
27 IdleLogoutDialog();
28 virtual ~IdleLogoutDialog();
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 IdleLogoutDialogHandler* handler_;
48
49 DISALLOW_COPY_AND_ASSIGN(IdleLogoutDialog);
50 };
51
52 class IdleLogoutDialogUI : public HtmlDialogUI {
53 public:
54 explicit IdleLogoutDialogUI(content::WebUI* web_ui);
55 virtual ~IdleLogoutDialogUI() {}
56
57 private:
58 DISALLOW_COPY_AND_ASSIGN(IdleLogoutDialogUI);
59 };
60
61 #endif // CHROME_BROWSER_UI_WEBUI_CHROMEOS_IDLE_LOGOUT_DIALOG_H_
OLDNEW
« no previous file with comments | « chrome/browser/ui/webui/chrome_web_ui_controller_factory.cc ('k') | chrome/browser/ui/webui/chromeos/idle_logout_dialog.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698