diff options
author | cpu@google.com <cpu@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2008-12-08 20:30:53 +0000 |
---|---|---|
committer | cpu@google.com <cpu@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2008-12-08 20:30:53 +0000 |
commit | b3d565264e6073bd00e4dfd81c8f887ea01fb58c (patch) | |
tree | b37f2589de3352d27f2bbcca2a579780f8c0b168 /chrome/installer/util/html_dialog.h | |
parent | e292fca9e47cba237bb5b2d885f900eddecd70c5 (diff) | |
download | chromium_src-b3d565264e6073bd00e4dfd81c8f887ea01fb58c.zip chromium_src-b3d565264e6073bd00e4dfd81c8f887ea01fb58c.tar.gz chromium_src-b3d565264e6073bd00e4dfd81c8f887ea01fb58c.tar.bz2 |
More addions to the installer html dialog class
- EulaDialog subclass
- Wired the output parameter
BUG=1468838
Review URL: http://codereview.chromium.org/13601
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@6533 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/installer/util/html_dialog.h')
-rw-r--r-- | chrome/installer/util/html_dialog.h | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/chrome/installer/util/html_dialog.h b/chrome/installer/util/html_dialog.h index 3455d73..91ace2d 100644 --- a/chrome/installer/util/html_dialog.h +++ b/chrome/installer/util/html_dialog.h @@ -7,6 +7,8 @@ #include <string> +#include "base/basictypes.h" + // This is the interface for creating HTML-based Dialogs *before* Chrome has // been installed or when there is a suspicion chrome is not working. In // other words, the dialogs use another native html rendering engine. In the @@ -56,6 +58,28 @@ class HTMLDialog { // different underlying implementation according to the url protocol. HTMLDialog* CreateNativeHTMLDialog(const std::wstring& url); +// This class leverages HTMLDialog to create a dialog that is suitable +// for a end-user-agreement modal dialog. +class EulaHTMLDialog { + public: + // |file| points to an html file on disk. + explicit EulaHTMLDialog(const std::wstring& file); + ~EulaHTMLDialog(); + + // Shows the dialog and blocks for user input. The return value is true if + // the user accepted and false otherwise. + bool ShowModal(); + + private: + class Customizer : public HTMLDialog::CustomizationCallback { + public: + virtual void OnBeforeCreation(void** extra); + virtual void OnBeforeDisplay(void* window); + }; + + HTMLDialog* dialog_; + DISALLOW_COPY_AND_ASSIGN(EulaHTMLDialog); +}; } // namespace installer |