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

Unified Diff: chrome/browser/app_modal_dialog.h

Issue 373006: Implement window.alert() and its cousins for extensions.... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 11 years, 1 month 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
« no previous file with comments | « chrome/app/generated_resources.grd ('k') | chrome/browser/app_modal_dialog.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/app_modal_dialog.h
===================================================================
--- chrome/browser/app_modal_dialog.h (revision 31156)
+++ chrome/browser/app_modal_dialog.h (working copy)
@@ -21,6 +21,7 @@
typedef void* NativeDialog;
#endif
+class JavaScriptMessageBoxClient;
class TabContents;
namespace IPC {
class Message;
@@ -33,7 +34,7 @@
public:
// A union of data necessary to determine the type of message box to
// show. |dialog_flags| is a MessageBox flag.
- AppModalDialog(TabContents* tab_contents,
+ AppModalDialog(JavaScriptMessageBoxClient* client,
const std::wstring& title,
int dialog_flags,
const std::wstring& message_text,
@@ -63,8 +64,8 @@
/////////////////////////////////////////////////////////////////////////////
// Getters so NativeDialog can get information about the message box.
- TabContents* tab_contents() {
- return tab_contents_;
+ JavaScriptMessageBoxClient* client() {
+ return client_;
}
int dialog_flags() {
return dialog_flags_;
@@ -103,8 +104,15 @@
// A reference to the platform native dialog box.
NativeDialog dialog_;
+ // An implementation of the client interface to provide supporting methods
+ // and receive results.
+ JavaScriptMessageBoxClient* client_;
+
+ // True if the dialog should no longer be shown, e.g. because the underlying
+ // tab navigated away while the dialog was queued.
+ bool skip_this_dialog_;
+
// Information about the message box is held in the following variables.
- TabContents* tab_contents_;
std::wstring title_;
int dialog_flags_;
std::wstring message_text_;
Property changes on: chrome\browser\app_modal_dialog.h
___________________________________________________________________
Added: svn:eol-style
+ LF
« no previous file with comments | « chrome/app/generated_resources.grd ('k') | chrome/browser/app_modal_dialog.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698