OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2006, 2007, 2009, 2011 Apple Inc. All rights reserved. | 2 * Copyright (C) 2006, 2007, 2009, 2011 Apple Inc. All rights reserved. |
3 * Copyright (C) 2008, 2010 Nokia Corporation and/or its subsidiary(-ies) | 3 * Copyright (C) 2008, 2010 Nokia Corporation and/or its subsidiary(-ies) |
4 * Copyright (C) 2012, Samsung Electronics. All rights reserved. | 4 * Copyright (C) 2012, Samsung Electronics. All rights reserved. |
5 * | 5 * |
6 * This library is free software; you can redistribute it and/or | 6 * This library is free software; you can redistribute it and/or |
7 * modify it under the terms of the GNU Library General Public | 7 * modify it under the terms of the GNU Library General Public |
8 * License as published by the Free Software Foundation; either | 8 * License as published by the Free Software Foundation; either |
9 * version 2 of the License, or (at your option) any later version. | 9 * version 2 of the License, or (at your option) any later version. |
10 * | 10 * |
(...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
86 | 86 |
87 InspectorInstrumentationCookie cookie = InspectorInstrumentation::willRunJav
aScriptDialog(frame, message, dialogType); | 87 InspectorInstrumentationCookie cookie = InspectorInstrumentation::willRunJav
aScriptDialog(frame, message, dialogType); |
88 bool result = delegate(); | 88 bool result = delegate(); |
89 InspectorInstrumentation::didRunJavaScriptDialog(cookie, result); | 89 InspectorInstrumentation::didRunJavaScriptDialog(cookie, result); |
90 return result; | 90 return result; |
91 } | 91 } |
92 | 92 |
93 bool ChromeClient::openBeforeUnloadConfirmPanel(const String& message, LocalFram
e* frame, bool isReload) | 93 bool ChromeClient::openBeforeUnloadConfirmPanel(const String& message, LocalFram
e* frame, bool isReload) |
94 { | 94 { |
95 ASSERT(frame); | 95 ASSERT(frame); |
96 return openJavaScriptDialog(frame, message, ChromeClient::HTMLDialog, [this,
frame, &message, isReload]() { | 96 return openJavaScriptDialog(frame, message, ChromeClient::HTMLDialog, [this,
frame, isReload]() { |
97 return openBeforeUnloadConfirmPanelDelegate(frame, message, isReload); | 97 return openBeforeUnloadConfirmPanelDelegate(frame, isReload); |
98 }); | 98 }); |
99 } | 99 } |
100 | 100 |
101 bool ChromeClient::openJavaScriptAlert(LocalFrame* frame, const String& message) | 101 bool ChromeClient::openJavaScriptAlert(LocalFrame* frame, const String& message) |
102 { | 102 { |
103 ASSERT(frame); | 103 ASSERT(frame); |
104 if (!canOpenModalIfDuringPageDismissal(frame->tree().top(), ChromeClient::Al
ertDialog, message)) | 104 if (!canOpenModalIfDuringPageDismissal(frame->tree().top(), ChromeClient::Al
ertDialog, message)) |
105 return false; | 105 return false; |
106 return openJavaScriptDialog(frame, message, ChromeClient::AlertDialog, [this
, frame, &message]() { | 106 return openJavaScriptDialog(frame, message, ChromeClient::AlertDialog, [this
, frame, &message]() { |
107 return openJavaScriptAlertDelegate(frame, message); | 107 return openJavaScriptAlertDelegate(frame, message); |
(...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
184 { | 184 { |
185 // Defer loads in case the client method runs a new event loop that would | 185 // Defer loads in case the client method runs a new event loop that would |
186 // otherwise cause the load to continue while we're in the middle of | 186 // otherwise cause the load to continue while we're in the middle of |
187 // executing JavaScript. | 187 // executing JavaScript. |
188 ScopedPageLoadDeferrer deferrer; | 188 ScopedPageLoadDeferrer deferrer; |
189 | 189 |
190 printDelegate(frame); | 190 printDelegate(frame); |
191 } | 191 } |
192 | 192 |
193 } // namespace blink | 193 } // namespace blink |
OLD | NEW |