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()) |
|
dcheng
2015/06/17 23:39:50
TODO this?
nasko
2015/06/19 13:23:22
Actually, the method is available on WebRemoteFram
| |
| 404 m_webView->mainFrame()->stopLoading(); | |
| 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 bool ChromeClientImpl::openJavaScriptAlertDelegate(LocalFrame* frame, const Stri ng& message) | 412 bool ChromeClientImpl::openJavaScriptAlertDelegate(LocalFrame* frame, const Stri ng& message) |
| 412 { | 413 { |
| 413 notifyPopupOpeningObservers(); | 414 notifyPopupOpeningObservers(); |
| (...skipping 538 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 952 } | 953 } |
| 953 | 954 |
| 954 void ChromeClientImpl::notifyPopupOpeningObservers() const | 955 void ChromeClientImpl::notifyPopupOpeningObservers() const |
| 955 { | 956 { |
| 956 const Vector<PopupOpeningObserver*> observers(m_popupOpeningObservers); | 957 const Vector<PopupOpeningObserver*> observers(m_popupOpeningObservers); |
| 957 for (const auto& observer : observers) | 958 for (const auto& observer : observers) |
| 958 observer->willOpenPopup(); | 959 observer->willOpenPopup(); |
| 959 } | 960 } |
| 960 | 961 |
| 961 } // namespace blink | 962 } // namespace blink |
| OLD | NEW |