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

Side by Side Diff: content/public/browser/javascript_dialog_manager.h

Issue 1714573002: Remove the ability of webpages to specify strings for the onbeforeunload dialog. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase again Created 4 years, 9 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
« no previous file with comments | « content/common/frame_messages.h ('k') | content/renderer/render_frame_impl.h » ('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) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 CONTENT_PUBLIC_BROWSER_JAVASCRIPT_DIALOG_MANAGER_H_ 5 #ifndef CONTENT_PUBLIC_BROWSER_JAVASCRIPT_DIALOG_MANAGER_H_
6 #define CONTENT_PUBLIC_BROWSER_JAVASCRIPT_DIALOG_MANAGER_H_ 6 #define CONTENT_PUBLIC_BROWSER_JAVASCRIPT_DIALOG_MANAGER_H_
7 7
8 #include <string> 8 #include <string>
9 9
10 #include "base/callback.h" 10 #include "base/callback.h"
(...skipping 22 matching lines...) Expand all
33 const GURL& origin_url, 33 const GURL& origin_url,
34 const std::string& accept_lang, 34 const std::string& accept_lang,
35 JavaScriptMessageType javascript_message_type, 35 JavaScriptMessageType javascript_message_type,
36 const base::string16& message_text, 36 const base::string16& message_text,
37 const base::string16& default_prompt_text, 37 const base::string16& default_prompt_text,
38 const DialogClosedCallback& callback, 38 const DialogClosedCallback& callback,
39 bool* did_suppress_message) = 0; 39 bool* did_suppress_message) = 0;
40 40
41 // Displays a dialog asking the user if they want to leave a page. 41 // Displays a dialog asking the user if they want to leave a page.
42 virtual void RunBeforeUnloadDialog(WebContents* web_contents, 42 virtual void RunBeforeUnloadDialog(WebContents* web_contents,
43 const base::string16& message_text,
44 bool is_reload, 43 bool is_reload,
45 const DialogClosedCallback& callback) = 0; 44 const DialogClosedCallback& callback) = 0;
46 45
47 // Accepts or dismisses the active JavaScript dialog, which must be owned 46 // Accepts or dismisses the active JavaScript dialog, which must be owned
48 // by the given |web_contents|. If |prompt_override| is not null, the prompt 47 // by the given |web_contents|. If |prompt_override| is not null, the prompt
49 // text of the dialog should be set before accepting. Returns true if the 48 // text of the dialog should be set before accepting. Returns true if the
50 // dialog was handled. 49 // dialog was handled.
51 virtual bool HandleJavaScriptDialog(WebContents* web_contents, 50 virtual bool HandleJavaScriptDialog(WebContents* web_contents,
52 bool accept, 51 bool accept,
53 const base::string16* prompt_override); 52 const base::string16* prompt_override);
54 53
55 // Cancels all active and pending dialogs for the given WebContents. 54 // Cancels all active and pending dialogs for the given WebContents.
56 virtual void CancelActiveAndPendingDialogs(WebContents* web_contents) = 0; 55 virtual void CancelActiveAndPendingDialogs(WebContents* web_contents) = 0;
57 56
58 // Reset any saved state tied to the given WebContents. 57 // Reset any saved state tied to the given WebContents.
59 virtual void ResetDialogState(WebContents* web_contents) = 0; 58 virtual void ResetDialogState(WebContents* web_contents) = 0;
60 59
61 virtual ~JavaScriptDialogManager() {} 60 virtual ~JavaScriptDialogManager() {}
62 }; 61 };
63 62
64 } // namespace content 63 } // namespace content
65 64
66 #endif // CONTENT_PUBLIC_BROWSER_JAVASCRIPT_DIALOG_MANAGER_H_ 65 #endif // CONTENT_PUBLIC_BROWSER_JAVASCRIPT_DIALOG_MANAGER_H_
OLDNEW
« no previous file with comments | « content/common/frame_messages.h ('k') | content/renderer/render_frame_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698