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

Side by Side Diff: chrome/browser/message_box_handler.h

Issue 560030: Refactored out JS specific part of modal dialog stack into its own class, exp... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 10 years, 10 months 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « chrome/browser/jsmessage_box_handler.cc ('k') | chrome/browser/message_box_handler.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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_MESSAGE_BOX_HANDLER_H_
6 #define CHROME_BROWSER_JSMESSAGE_BOX_HANDLER_H_ 6 #define CHROME_BROWSER_MESSAGE_BOX_HANDLER_H_
7 7
8 #include <string> 8 #include <string>
9 9
10 #include "chrome/browser/browsing_data_local_storage_helper.h"
11 #include "googleurl/src/gurl.h"
10 #include "ipc/ipc_message.h" 12 #include "ipc/ipc_message.h"
13 #include "net/base/cookie_monster.h"
11 14
15 class CookiePromptModalDialogDelegate;
12 class GURL; 16 class GURL;
13 class JavaScriptMessageBoxClient; 17 class JavaScriptMessageBoxClient;
14 class TabContents; 18 class TabContents;
15 19
16 // Creates and runs a Javascript Message Box dialog. 20 // Creates and runs a Javascript Message Box dialog.
17 // The dialog type is specified within |dialog_flags|, the 21 // The dialog type is specified within |dialog_flags|, the
18 // default static display text is in |message_text| and if the dialog box is 22 // 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 23 // 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 24 // |default_prompt_text|. The result of the operation is returned using
21 // |reply_msg|. 25 // |reply_msg|.
22 void RunJavascriptMessageBox(JavaScriptMessageBoxClient* client, 26 void RunJavascriptMessageBox(JavaScriptMessageBoxClient* client,
23 const GURL& frame_url, 27 const GURL& frame_url,
24 int dialog_flags, 28 int dialog_flags,
25 const std::wstring& message_text, 29 const std::wstring& message_text,
26 const std::wstring& default_prompt_text, 30 const std::wstring& default_prompt_text,
27 bool display_suppress_checkbox, 31 bool display_suppress_checkbox,
28 IPC::Message* reply_msg); 32 IPC::Message* reply_msg);
29 33
30 // This will display a modal dialog box with a header and footer asking the 34 // 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 35 // 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 36 // |message_text| between the header and footer. The users response is
33 // returned to the renderer using |reply_msg|. 37 // returned to the renderer using |reply_msg|.
34 void RunBeforeUnloadDialog(TabContents* tab_contents, 38 void RunBeforeUnloadDialog(TabContents* tab_contents,
35 const std::wstring& message_text, 39 const std::wstring& message_text,
36 IPC::Message* reply_msg); 40 IPC::Message* reply_msg);
37 41
38 #endif // CHROME_BROWSER_JSMESSAGE_BOX_HANDLER_H_ 42 // TODO(zelidrag): bug 32719, implement these modal dialogs on Linux and Mac.
43 #if defined(OS_WIN)
44 // This will display a modal dialog box with cookie information asking
45 // user to accept or reject the cookie. The caller should pass |delegate|
46 // that will handle the reply from the dialog.
47 void RunCookiePrompt(TabContents* tab_contents,
48 const GURL& url,
49 const std::string& cookie_line,
50 CookiePromptModalDialogDelegate* delegate);
51
52 // This will display a modal dialog box with local storage information asking
53 // user to accept or reject it. The caller should pass |delegate|
54 // that will handle the reply from the dialog.
55 void RunLocalStoragePrompt(
56 TabContents* tab_contents,
57 const BrowsingDataLocalStorageHelper::LocalStorageInfo& local_storage_info,
58 CookiePromptModalDialogDelegate* delegate);
59 #endif
60
61 #endif // CHROME_BROWSER_MESSAGE_BOX_HANDLER_H_
62
OLDNEW
« no previous file with comments | « chrome/browser/jsmessage_box_handler.cc ('k') | chrome/browser/message_box_handler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698