| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2009 Google Inc. All rights reserved. | 2 * Copyright (C) 2009 Google Inc. All rights reserved. |
| 3 * Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). | 3 * Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). |
| 4 * | 4 * |
| 5 * Redistribution and use in source and binary forms, with or without | 5 * Redistribution and use in source and binary forms, with or without |
| 6 * modification, are permitted provided that the following conditions are | 6 * modification, are permitted provided that the following conditions are |
| 7 * met: | 7 * met: |
| 8 * | 8 * |
| 9 * * Redistributions of source code must retain the above copyright | 9 * * Redistributions of source code must retain the above copyright |
| 10 * notice, this list of conditions and the following disclaimer. | 10 * notice, this list of conditions and the following disclaimer. |
| (...skipping 459 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 470 | 470 |
| 471 bool ChromeClientImpl::openBeforeUnloadConfirmPanelDelegate(LocalFrame* frame, | 471 bool ChromeClientImpl::openBeforeUnloadConfirmPanelDelegate(LocalFrame* frame, |
| 472 bool isReload) { | 472 bool isReload) { |
| 473 notifyPopupOpeningObservers(); | 473 notifyPopupOpeningObservers(); |
| 474 WebLocalFrameImpl* webframe = WebLocalFrameImpl::fromFrame(frame); | 474 WebLocalFrameImpl* webframe = WebLocalFrameImpl::fromFrame(frame); |
| 475 return webframe->client() && | 475 return webframe->client() && |
| 476 webframe->client()->runModalBeforeUnloadDialog(isReload); | 476 webframe->client()->runModalBeforeUnloadDialog(isReload); |
| 477 } | 477 } |
| 478 | 478 |
| 479 void ChromeClientImpl::closeWindowSoon() { | 479 void ChromeClientImpl::closeWindowSoon() { |
| 480 // Make sure this Page can no longer be found by JS. | |
| 481 m_webView->page()->willBeClosed(); | |
| 482 | |
| 483 // Make sure that all loading is stopped. Ensures that JS stops executing! | |
| 484 m_webView->mainFrame()->stopLoading(); | |
| 485 | |
| 486 if (m_webView->client()) | 480 if (m_webView->client()) |
| 487 m_webView->client()->closeWidgetSoon(); | 481 m_webView->client()->closeWidgetSoon(); |
| 488 } | 482 } |
| 489 | 483 |
| 490 // Although a LocalFrame is passed in, we don't actually use it, since we | 484 // Although a LocalFrame is passed in, we don't actually use it, since we |
| 491 // already know our own m_webView. | 485 // already know our own m_webView. |
| 492 bool ChromeClientImpl::openJavaScriptAlertDelegate(LocalFrame* frame, | 486 bool ChromeClientImpl::openJavaScriptAlertDelegate(LocalFrame* frame, |
| 493 const String& message) { | 487 const String& message) { |
| 494 notifyPopupOpeningObservers(); | 488 notifyPopupOpeningObservers(); |
| 495 WebLocalFrameImpl* webframe = WebLocalFrameImpl::fromFrame(frame); | 489 WebLocalFrameImpl* webframe = WebLocalFrameImpl::fromFrame(frame); |
| (...skipping 669 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1165 if (RuntimeEnabledFeatures::presentationEnabled()) | 1159 if (RuntimeEnabledFeatures::presentationEnabled()) |
| 1166 PresentationController::provideTo(frame, client->presentationClient()); | 1160 PresentationController::provideTo(frame, client->presentationClient()); |
| 1167 if (RuntimeEnabledFeatures::audioOutputDevicesEnabled()) | 1161 if (RuntimeEnabledFeatures::audioOutputDevicesEnabled()) |
| 1168 provideAudioOutputDeviceClientTo(frame, | 1162 provideAudioOutputDeviceClientTo(frame, |
| 1169 AudioOutputDeviceClientImpl::create()); | 1163 AudioOutputDeviceClientImpl::create()); |
| 1170 if (RuntimeEnabledFeatures::installedAppEnabled()) | 1164 if (RuntimeEnabledFeatures::installedAppEnabled()) |
| 1171 InstalledAppController::provideTo(frame, client->installedAppClient()); | 1165 InstalledAppController::provideTo(frame, client->installedAppClient()); |
| 1172 } | 1166 } |
| 1173 | 1167 |
| 1174 } // namespace blink | 1168 } // namespace blink |
| OLD | NEW |