Chromium Code Reviews| 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 382 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 393 return webframe->client()->runModalBeforeUnloadDialog(isReload, message) ; | 393 return webframe->client()->runModalBeforeUnloadDialog(isReload, message) ; |
| 394 return false; | 394 return false; |
| 395 } | 395 } |
| 396 | 396 |
| 397 void ChromeClientImpl::closeWindowSoon() | 397 void ChromeClientImpl::closeWindowSoon() |
| 398 { | 398 { |
| 399 // Make sure this Page can no longer be found by JS. | 399 // Make sure this Page can no longer be found by JS. |
| 400 Page::ordinaryPages().remove(m_webView->page()); | 400 Page::ordinaryPages().remove(m_webView->page()); |
| 401 | 401 |
| 402 // Make sure that all loading is stopped. Ensures that JS stops executing! | 402 // Make sure that all loading is stopped. Ensures that JS stops executing! |
| 403 m_webView->mainFrame()->stopLoading(); | 403 if (m_webView->mainFrame()->isWebLocalFrame()) |
| 404 m_webView->mainFrame()->stopLoading(); | |
|
dcheng
2015/06/16 20:08:23
Oof. We'll need to fix this too.
nasko
2015/06/16 22:58:54
I didn't get to this one today :(. I will fix it o
| |
| 404 | 405 |
| 405 if (m_webView->client()) | 406 if (m_webView->client()) |
| 406 m_webView->client()->closeWidgetSoon(); | 407 m_webView->client()->closeWidgetSoon(); |
| 407 } | 408 } |
| 408 | 409 |
| 409 // Although a LocalFrame is passed in, we don't actually use it, since we | 410 // Although a LocalFrame is passed in, we don't actually use it, since we |
| 410 // already know our own m_webView. | 411 // already know our own m_webView. |
| 411 void ChromeClientImpl::openJavaScriptAlertDelegate(LocalFrame* frame, const Stri ng& message) | 412 void ChromeClientImpl::openJavaScriptAlertDelegate(LocalFrame* frame, const Stri ng& message) |
| 412 { | 413 { |
| 413 notifyPopupOpeningObservers(); | 414 notifyPopupOpeningObservers(); |
| (...skipping 536 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 950 } | 951 } |
| 951 | 952 |
| 952 void ChromeClientImpl::notifyPopupOpeningObservers() const | 953 void ChromeClientImpl::notifyPopupOpeningObservers() const |
| 953 { | 954 { |
| 954 const Vector<PopupOpeningObserver*> observers(m_popupOpeningObservers); | 955 const Vector<PopupOpeningObserver*> observers(m_popupOpeningObservers); |
| 955 for (const auto& observer : observers) | 956 for (const auto& observer : observers) |
| 956 observer->willOpenPopup(); | 957 observer->willOpenPopup(); |
| 957 } | 958 } |
| 958 | 959 |
| 959 } // namespace blink | 960 } // namespace blink |
| OLD | NEW |