OLD | NEW |
| (Empty) |
1 // Copyright (c) 2006-2008 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_JSMESSAGE_BOX_HANDLER_H_ | |
6 #define CHROME_BROWSER_JSMESSAGE_BOX_HANDLER_H_ | |
7 | |
8 #include <string> | |
9 | |
10 #include "ipc/ipc_message.h" | |
11 | |
12 class GURL; | |
13 class JavaScriptMessageBoxClient; | |
14 class TabContents; | |
15 | |
16 // Creates and runs a Javascript Message Box dialog. | |
17 // The dialog type is specified within |dialog_flags|, the | |
18 // default static display text is in |message_text| and if the dialog box is | |
19 // a user input prompt() box, the default text for the text field is in | |
20 // |default_prompt_text|. The result of the operation is returned using | |
21 // |reply_msg|. | |
22 void RunJavascriptMessageBox(JavaScriptMessageBoxClient* client, | |
23 const GURL& frame_url, | |
24 int dialog_flags, | |
25 const std::wstring& message_text, | |
26 const std::wstring& default_prompt_text, | |
27 bool display_suppress_checkbox, | |
28 IPC::Message* reply_msg); | |
29 | |
30 // This will display a modal dialog box with a header and footer asking the | |
31 // the user if they wish to navigate away from a page, with additional text | |
32 // |message_text| between the header and footer. The users response is | |
33 // returned to the renderer using |reply_msg|. | |
34 void RunBeforeUnloadDialog(TabContents* tab_contents, | |
35 const std::wstring& message_text, | |
36 IPC::Message* reply_msg); | |
37 | |
38 #endif // CHROME_BROWSER_JSMESSAGE_BOX_HANDLER_H_ | |
OLD | NEW |