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

Side by Side Diff: android_webview/browser/aw_javascript_dialog_manager.cc

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 | « android_webview/browser/aw_javascript_dialog_manager.h ('k') | android_webview/native/BUILD.gn » ('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 #include "android_webview/browser/aw_javascript_dialog_manager.h" 5 #include "android_webview/browser/aw_javascript_dialog_manager.h"
6 6
7 #include "android_webview/browser/aw_contents_client_bridge_base.h" 7 #include "android_webview/browser/aw_contents_client_bridge_base.h"
8 #include "content/public/browser/javascript_dialog_manager.h" 8 #include "content/public/browser/javascript_dialog_manager.h"
9 #include "content/public/browser/web_contents.h" 9 #include "content/public/browser/web_contents.h"
10 10
(...skipping 21 matching lines...) Expand all
32 32
33 bridge->RunJavaScriptDialog(message_type, 33 bridge->RunJavaScriptDialog(message_type,
34 origin_url, 34 origin_url,
35 message_text, 35 message_text,
36 default_prompt_text, 36 default_prompt_text,
37 callback); 37 callback);
38 } 38 }
39 39
40 void AwJavaScriptDialogManager::RunBeforeUnloadDialog( 40 void AwJavaScriptDialogManager::RunBeforeUnloadDialog(
41 content::WebContents* web_contents, 41 content::WebContents* web_contents,
42 const base::string16& message_text,
43 bool is_reload, 42 bool is_reload,
44 const DialogClosedCallback& callback) { 43 const DialogClosedCallback& callback) {
45 AwContentsClientBridgeBase* bridge = 44 AwContentsClientBridgeBase* bridge =
46 AwContentsClientBridgeBase::FromWebContents(web_contents); 45 AwContentsClientBridgeBase::FromWebContents(web_contents);
47 if (!bridge) { 46 if (!bridge) {
48 callback.Run(false, base::string16()); 47 callback.Run(false, base::string16());
49 return; 48 return;
50 } 49 }
51 50
52 bridge->RunBeforeUnloadDialog(web_contents->GetURL(), 51 bridge->RunBeforeUnloadDialog(web_contents->GetURL(),
53 message_text,
54 callback); 52 callback);
55 } 53 }
56 54
57 void AwJavaScriptDialogManager::CancelActiveAndPendingDialogs( 55 void AwJavaScriptDialogManager::CancelActiveAndPendingDialogs(
58 content::WebContents* web_contents) { 56 content::WebContents* web_contents) {
59 } 57 }
60 58
61 void AwJavaScriptDialogManager::ResetDialogState( 59 void AwJavaScriptDialogManager::ResetDialogState(
62 content::WebContents* web_contents) { 60 content::WebContents* web_contents) {
63 } 61 }
64 62
65 } // namespace android_webview 63 } // namespace android_webview
OLDNEW
« no previous file with comments | « android_webview/browser/aw_javascript_dialog_manager.h ('k') | android_webview/native/BUILD.gn » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698