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

Unified Diff: chrome/browser/ui/webui/chromeos/kiosk_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: Created 8 years, 11 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/ui/webui/chromeos/kiosk_mode_logout_dialog.h
diff --git a/chrome/browser/ui/webui/chromeos/kiosk_mode_logout_dialog.h b/chrome/browser/ui/webui/chromeos/kiosk_mode_logout_dialog.h
new file mode 100644
index 0000000000000000000000000000000000000000..70f05340b1a4e07c288526f204da9bb92555d8b7
--- /dev/null
+++ b/chrome/browser/ui/webui/chromeos/kiosk_mode_logout_dialog.h
@@ -0,0 +1,76 @@
+// Copyright (c) 2012 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef CHROME_BROWSER_UI_WEBUI_CHROMEOS_KIOSK_MODE_LOGOUT_DIALOG_H_
+#define CHROME_BROWSER_UI_WEBUI_CHROMEOS_KIOSK_MODE_LOGOUT_DIALOG_H_
+#pragma once
+
+#include <string>
+#include <vector>
+
+#include "base/memory/scoped_ptr.h"
+#include "base/string16.h"
+#include "base/values.h"
+#include "chrome/browser/ui/webui/html_dialog_ui.h"
+#include "content/public/browser/web_ui_message_handler.h"
+#include "ui/gfx/native_widget_types.h"
+
+
+class KioskModeLogoutDialogHandler;
+
+class KioskModeLogoutDialog : private HtmlDialogUIDelegate {
+ public:
+ static void ShowKioskModeLogoutDialog();
+ static void CloseKioskModeLogoutDialog();
+
+ private:
+ explicit KioskModeLogoutDialog();
+ virtual ~KioskModeLogoutDialog();
+
+ void ShowDialog();
+ void CloseDialog();
+
+ // HtmlDialogUIDelegate methods
+ virtual ui::ModalType GetDialogModalType() const OVERRIDE;
+ virtual string16 GetDialogTitle() const OVERRIDE;
+ virtual GURL GetDialogContentURL() const OVERRIDE;
+ virtual void GetWebUIMessageHandlers(
+ std::vector<content::WebUIMessageHandler*>* handlers) const OVERRIDE;
+ virtual void GetDialogSize(gfx::Size* size) const OVERRIDE;
+ virtual std::string GetDialogArgs() const OVERRIDE;
+ virtual void OnDialogClosed(const std::string& json_retval) OVERRIDE;
+ virtual void OnCloseContents(content::WebContents* source,
+ bool* out_close_dialog) OVERRIDE;
+ virtual bool ShouldShowDialogTitle() const OVERRIDE;
+
+ content::WebContents* contents_;
+ KioskModeLogoutDialogHandler* handler_;
+
+ DISALLOW_COPY_AND_ASSIGN(KioskModeLogoutDialog);
+};
+
+class KioskModeLogoutDialogHandler : public content::WebUIMessageHandler {
xiyuan 2012/01/20 18:23:44 Think you can move this into cc file since it shou
rkc 2012/01/26 03:37:23 Done.
+ public:
+ explicit KioskModeLogoutDialogHandler() {}
+ virtual void RegisterMessages() OVERRIDE;
+ void CloseDialog();
+
+ private:
+ void RequestRestart(const base::ListValue*);
+
+ content::WebContents* contents_;
+
+ DISALLOW_COPY_AND_ASSIGN(KioskModeLogoutDialogHandler);
+};
+
+class KioskModeLogoutDialogUI : public HtmlDialogUI {
+ public:
+ explicit KioskModeLogoutDialogUI(content::WebUI* web_ui);
+ virtual ~KioskModeLogoutDialogUI() {}
+
+ private:
+ DISALLOW_COPY_AND_ASSIGN(KioskModeLogoutDialogUI);
+};
+
+#endif // CHROME_BROWSER_UI_WEBUI_CHROMEOS_KIOSK_MODE_LOGOUT_DIALOG_H_

Powered by Google App Engine
This is Rietveld 408576698