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" |
| 17 #include "ui/gfx/native_widget_types.h" |
| 18 |
| 19 |
| 20 class RetailModeLogoutDialogHandler; |
| 21 |
| 22 class RetailModeLogoutDialog : private HtmlDialogUIDelegate { |
| 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_; |
| 49 |
| 50 DISALLOW_COPY_AND_ASSIGN(RetailModeLogoutDialog); |
| 51 }; |
| 52 |
| 53 class RetailModeLogoutDialogUI : public HtmlDialogUI { |
| 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 |