diff options
author | ben@chromium.org <ben@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-09-28 15:40:20 +0000 |
---|---|---|
committer | ben@chromium.org <ben@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-09-28 15:40:20 +0000 |
commit | 160ad3d101988b9d842fef8b18cc49c54c9a1de5 (patch) | |
tree | 567875d2f363d0b110ad25da9a9aa07cffcaa201 /chrome/browser/native_app_modal_dialog.h | |
parent | 341078d4b72bd3de280b960be6cd4ac5e5ab0265 (diff) | |
download | chromium_src-160ad3d101988b9d842fef8b18cc49c54c9a1de5.zip chromium_src-160ad3d101988b9d842fef8b18cc49c54c9a1de5.tar.gz chromium_src-160ad3d101988b9d842fef8b18cc49c54c9a1de5.tar.bz2 |
Refactor AppModalDialog to more clearly isolate platform specific UI pieces and eliminate the dependency on individual frontends from cross platform code.
BUG=none
TEST=none
Review URL: http://codereview.chromium.org/3398015
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@60785 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/native_app_modal_dialog.h')
-rw-r--r-- | chrome/browser/native_app_modal_dialog.h | 39 |
1 files changed, 39 insertions, 0 deletions
diff --git a/chrome/browser/native_app_modal_dialog.h b/chrome/browser/native_app_modal_dialog.h new file mode 100644 index 0000000..7b4c5b2 --- /dev/null +++ b/chrome/browser/native_app_modal_dialog.h @@ -0,0 +1,39 @@ +// Copyright (c) 2010 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_NATIVE_APP_MODAL_DIALOG_H_ +#define CHROME_BROWSER_NATIVE_APP_MODAL_DIALOG_H_ +#pragma once + +#include "gfx/native_widget_types.h" + +class JavaScriptAppModalDialog; + +class NativeAppModalDialog { + public: + // Returns the buttons to be shown. See MessageBoxFlags for a description of + // the values. + virtual int GetAppModalDialogButtons() const = 0; + + // Shows the dialog. + virtual void ShowAppModalDialog() = 0; + + // Activates the dialog. + virtual void ActivateAppModalDialog() = 0; + + // Closes the dialog. + virtual void CloseAppModalDialog() = 0; + + // Accepts or cancels the dialog. + virtual void AcceptAppModalDialog() = 0; + virtual void CancelAppModalDialog() = 0; + + // Creates an app modal dialog for a JavaScript prompt. + static NativeAppModalDialog* CreateNativeJavaScriptPrompt( + JavaScriptAppModalDialog* dialog, + gfx::NativeWindow parent_window); +}; + +#endif // CHROME_BROWSER_NATIVE_APP_MODAL_DIALOG_H_ + |