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