| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2009, 2012 Google Inc. All rights reserved. | 2 * Copyright (C) 2009, 2012 Google Inc. All rights reserved. |
| 3 * Copyright (C) 2011 Apple Inc. All rights reserved. | 3 * Copyright (C) 2011 Apple Inc. All rights reserved. |
| 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 297 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 308 Frame* FrameLoaderClientImpl::lastChild() const | 308 Frame* FrameLoaderClientImpl::lastChild() const |
| 309 { | 309 { |
| 310 return toCoreFrame(m_webFrame->lastChild()); | 310 return toCoreFrame(m_webFrame->lastChild()); |
| 311 } | 311 } |
| 312 | 312 |
| 313 void FrameLoaderClientImpl::willBeDetached() | 313 void FrameLoaderClientImpl::willBeDetached() |
| 314 { | 314 { |
| 315 m_webFrame->willBeDetached(); | 315 m_webFrame->willBeDetached(); |
| 316 } | 316 } |
| 317 | 317 |
| 318 void FrameLoaderClientImpl::detached(FrameDetachType type) | 318 void FrameLoaderClientImpl::detached() |
| 319 { | 319 { |
| 320 // Alert the client that the frame is being detached. This is the last | 320 // Alert the client that the frame is being detached. This is the last |
| 321 // chance we have to communicate with the client. | 321 // chance we have to communicate with the client. |
| 322 RefPtrWillBeRawPtr<WebLocalFrameImpl> protector(m_webFrame); | 322 RefPtrWillBeRawPtr<WebLocalFrameImpl> protector(m_webFrame); |
| 323 | 323 |
| 324 WebFrameClient* client = m_webFrame->client(); | 324 WebFrameClient* client = m_webFrame->client(); |
| 325 if (!client) | 325 if (!client) |
| 326 return; | 326 return; |
| 327 | 327 |
| 328 m_webFrame->willDetachParent(); | 328 m_webFrame->willDetachParent(); |
| 329 | 329 |
| 330 // Signal that no further communication with WebFrameClient should take | 330 // Signal that no further communication with WebFrameClient should take |
| 331 // place at this point since we are no longer associated with the Page. | 331 // place at this point since we are no longer associated with the Page. |
| 332 m_webFrame->setClient(0); | 332 m_webFrame->setClient(0); |
| 333 | 333 |
| 334 client->frameDetached(m_webFrame, static_cast<WebFrameClient::DetachType>(ty
pe)); | 334 client->frameDetached(m_webFrame); |
| 335 // Clear our reference to LocalFrame at the very end, in case the client | 335 // Clear our reference to LocalFrame at the very end, in case the client |
| 336 // refers to it. | 336 // refers to it. |
| 337 m_webFrame->setCoreFrame(nullptr); | 337 m_webFrame->setCoreFrame(nullptr); |
| 338 } | 338 } |
| 339 | 339 |
| 340 void FrameLoaderClientImpl::dispatchWillSendRequest( | 340 void FrameLoaderClientImpl::dispatchWillSendRequest( |
| 341 DocumentLoader* loader, unsigned long identifier, ResourceRequest& request, | 341 DocumentLoader* loader, unsigned long identifier, ResourceRequest& request, |
| 342 const ResourceResponse& redirectResponse) | 342 const ResourceResponse& redirectResponse) |
| 343 { | 343 { |
| 344 // Give the WebFrameClient a crack at the request. | 344 // Give the WebFrameClient a crack at the request. |
| (...skipping 609 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 954 | 954 |
| 955 void FrameLoaderClientImpl::suddenTerminationDisablerChanged(bool present, Sudde
nTerminationDisablerType type) | 955 void FrameLoaderClientImpl::suddenTerminationDisablerChanged(bool present, Sudde
nTerminationDisablerType type) |
| 956 { | 956 { |
| 957 if (m_webFrame->client()) { | 957 if (m_webFrame->client()) { |
| 958 m_webFrame->client()->suddenTerminationDisablerChanged( | 958 m_webFrame->client()->suddenTerminationDisablerChanged( |
| 959 present, static_cast<WebFrameClient::SuddenTerminationDisablerType>(
type)); | 959 present, static_cast<WebFrameClient::SuddenTerminationDisablerType>(
type)); |
| 960 } | 960 } |
| 961 } | 961 } |
| 962 | 962 |
| 963 } // namespace blink | 963 } // namespace blink |
| OLD | NEW |