| 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 83 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 94 | 94 |
| 95 template <typename Delegate> | 95 template <typename Delegate> |
| 96 static bool openJavaScriptDialog(LocalFrame* frame, | 96 static bool openJavaScriptDialog(LocalFrame* frame, |
| 97 const String& message, | 97 const String& message, |
| 98 ChromeClient::DialogType dialogType, | 98 ChromeClient::DialogType dialogType, |
| 99 const Delegate& delegate) { | 99 const Delegate& delegate) { |
| 100 // Suspend pages in case the client method runs a new event loop that would | 100 // Suspend pages in case the client method runs a new event loop that would |
| 101 // otherwise cause the load to continue while we're in the middle of | 101 // otherwise cause the load to continue while we're in the middle of |
| 102 // executing JavaScript. | 102 // executing JavaScript. |
| 103 ScopedPageSuspender suspender; | 103 ScopedPageSuspender suspender; |
| 104 InspectorInstrumentation::willRunJavaScriptDialog(frame, message, dialogType); | 104 probe::willRunJavaScriptDialog(frame, message, dialogType); |
| 105 bool result = delegate(); | 105 bool result = delegate(); |
| 106 InspectorInstrumentation::didRunJavaScriptDialog(frame, result); | 106 probe::didRunJavaScriptDialog(frame, result); |
| 107 return result; | 107 return result; |
| 108 } | 108 } |
| 109 | 109 |
| 110 bool ChromeClient::openBeforeUnloadConfirmPanel(const String& message, | 110 bool ChromeClient::openBeforeUnloadConfirmPanel(const String& message, |
| 111 LocalFrame* frame, | 111 LocalFrame* frame, |
| 112 bool isReload) { | 112 bool isReload) { |
| 113 ASSERT(frame); | 113 ASSERT(frame); |
| 114 return openJavaScriptDialog( | 114 return openJavaScriptDialog( |
| 115 frame, message, ChromeClient::HTMLDialog, [this, frame, isReload]() { | 115 frame, message, ChromeClient::HTMLDialog, [this, frame, isReload]() { |
| 116 return openBeforeUnloadConfirmPanelDelegate(frame, isReload); | 116 return openBeforeUnloadConfirmPanelDelegate(frame, isReload); |
| (...skipping 114 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 231 // Suspend pages in case the client method runs a new event loop that would | 231 // Suspend pages in case the client method runs a new event loop that would |
| 232 // otherwise cause the load to continue while we're in the middle of | 232 // otherwise cause the load to continue while we're in the middle of |
| 233 // executing JavaScript. | 233 // executing JavaScript. |
| 234 ScopedPageSuspender suspender; | 234 ScopedPageSuspender suspender; |
| 235 | 235 |
| 236 printDelegate(frame); | 236 printDelegate(frame); |
| 237 return true; | 237 return true; |
| 238 } | 238 } |
| 239 | 239 |
| 240 } // namespace blink | 240 } // namespace blink |
| OLD | NEW |