| 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 454 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 465 if (m_webFrame->client()) | 465 if (m_webFrame->client()) |
| 466 m_webFrame->client()->didCommitProvisionalLoad(m_webFrame, WebHistoryIte
m(item), static_cast<WebHistoryCommitType>(commitType)); | 466 m_webFrame->client()->didCommitProvisionalLoad(m_webFrame, WebHistoryIte
m(item), static_cast<WebHistoryCommitType>(commitType)); |
| 467 WebDevToolsAgentImpl* devToolsAgent = WebLocalFrameImpl::fromFrame(m_webFram
e->frame()->localFrameRoot())->devToolsAgentImpl(); | 467 WebDevToolsAgentImpl* devToolsAgent = WebLocalFrameImpl::fromFrame(m_webFram
e->frame()->localFrameRoot())->devToolsAgentImpl(); |
| 468 if (devToolsAgent) | 468 if (devToolsAgent) |
| 469 devToolsAgent->didCommitLoadForLocalFrame(m_webFrame->frame()); | 469 devToolsAgent->didCommitLoadForLocalFrame(m_webFrame->frame()); |
| 470 } | 470 } |
| 471 | 471 |
| 472 void FrameLoaderClientImpl::dispatchDidFailProvisionalLoad( | 472 void FrameLoaderClientImpl::dispatchDidFailProvisionalLoad( |
| 473 const ResourceError& error, HistoryCommitType commitType) | 473 const ResourceError& error, HistoryCommitType commitType) |
| 474 { | 474 { |
| 475 OwnPtr<WebPluginLoadObserver> observer = pluginLoadObserver(m_webFrame->fram
e()->loader().provisionalDocumentLoader()); | 475 OwnPtrWillBeRawPtr<WebPluginLoadObserver> observer = pluginLoadObserver(m_we
bFrame->frame()->loader().provisionalDocumentLoader()); |
| 476 m_webFrame->didFail(error, true, commitType); | 476 m_webFrame->didFail(error, true, commitType); |
| 477 if (observer) | 477 if (observer) |
| 478 observer->didFailLoading(error); | 478 observer->didFailLoading(error); |
| 479 } | 479 } |
| 480 | 480 |
| 481 void FrameLoaderClientImpl::dispatchDidFailLoad(const ResourceError& error, Hist
oryCommitType commitType) | 481 void FrameLoaderClientImpl::dispatchDidFailLoad(const ResourceError& error, Hist
oryCommitType commitType) |
| 482 { | 482 { |
| 483 OwnPtr<WebPluginLoadObserver> observer = pluginLoadObserver(m_webFrame->fram
e()->loader().documentLoader()); | 483 OwnPtrWillBeRawPtr<WebPluginLoadObserver> observer = pluginLoadObserver(m_we
bFrame->frame()->loader().documentLoader()); |
| 484 m_webFrame->didFail(error, false, commitType); | 484 m_webFrame->didFail(error, false, commitType); |
| 485 if (observer) | 485 if (observer) |
| 486 observer->didFailLoading(error); | 486 observer->didFailLoading(error); |
| 487 | 487 |
| 488 // Don't clear the redirect chain, this will happen in the middle of client | 488 // Don't clear the redirect chain, this will happen in the middle of client |
| 489 // redirects, and we need the context. The chain will be cleared when the | 489 // redirects, and we need the context. The chain will be cleared when the |
| 490 // provisional load succeeds or fails, not the "real" one. | 490 // provisional load succeeds or fails, not the "real" one. |
| 491 } | 491 } |
| 492 | 492 |
| 493 void FrameLoaderClientImpl::dispatchDidFinishLoad() | 493 void FrameLoaderClientImpl::dispatchDidFinishLoad() |
| 494 { | 494 { |
| 495 OwnPtr<WebPluginLoadObserver> observer = pluginLoadObserver(m_webFrame->fram
e()->loader().documentLoader()); | 495 OwnPtrWillBeRawPtr<WebPluginLoadObserver> observer = pluginLoadObserver(m_we
bFrame->frame()->loader().documentLoader()); |
| 496 | 496 |
| 497 if (m_webFrame->client()) | 497 if (m_webFrame->client()) |
| 498 m_webFrame->client()->didFinishLoad(m_webFrame); | 498 m_webFrame->client()->didFinishLoad(m_webFrame); |
| 499 | 499 |
| 500 if (observer) | 500 if (observer) |
| 501 observer->didFinishLoading(); | 501 observer->didFinishLoading(); |
| 502 | 502 |
| 503 // Don't clear the redirect chain, this will happen in the middle of client | 503 // Don't clear the redirect chain, this will happen in the middle of client |
| 504 // redirects, and we need the context. The chain will be cleared when the | 504 // redirects, and we need the context. The chain will be cleared when the |
| 505 // provisional load succeeds or fails, not the "real" one. | 505 // provisional load succeeds or fails, not the "real" one. |
| (...skipping 325 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 831 | 831 |
| 832 if (plugInSupportsMIMEType) | 832 if (plugInSupportsMIMEType) |
| 833 return ObjectContentNetscapePlugin; | 833 return ObjectContentNetscapePlugin; |
| 834 | 834 |
| 835 if (MIMETypeRegistry::isSupportedNonImageMIMEType(mimeType)) | 835 if (MIMETypeRegistry::isSupportedNonImageMIMEType(mimeType)) |
| 836 return ObjectContentFrame; | 836 return ObjectContentFrame; |
| 837 | 837 |
| 838 return ObjectContentNone; | 838 return ObjectContentNone; |
| 839 } | 839 } |
| 840 | 840 |
| 841 PassOwnPtr<WebPluginLoadObserver> FrameLoaderClientImpl::pluginLoadObserver(Docu
mentLoader* loader) | 841 PassOwnPtrWillBeRawPtr<WebPluginLoadObserver> FrameLoaderClientImpl::pluginLoadO
bserver(DocumentLoader* loader) |
| 842 { | 842 { |
| 843 return WebDataSourceImpl::fromDocumentLoader(loader)->releasePluginLoadObser
ver(); | 843 return WebDataSourceImpl::fromDocumentLoader(loader)->releasePluginLoadObser
ver(); |
| 844 } | 844 } |
| 845 | 845 |
| 846 WebCookieJar* FrameLoaderClientImpl::cookieJar() const | 846 WebCookieJar* FrameLoaderClientImpl::cookieJar() const |
| 847 { | 847 { |
| 848 if (!m_webFrame->client()) | 848 if (!m_webFrame->client()) |
| 849 return 0; | 849 return 0; |
| 850 return m_webFrame->client()->cookieJar(m_webFrame); | 850 return m_webFrame->client()->cookieJar(m_webFrame); |
| 851 } | 851 } |
| (...skipping 126 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 978 | 978 |
| 979 void FrameLoaderClientImpl::suddenTerminationDisablerChanged(bool present, Sudde
nTerminationDisablerType type) | 979 void FrameLoaderClientImpl::suddenTerminationDisablerChanged(bool present, Sudde
nTerminationDisablerType type) |
| 980 { | 980 { |
| 981 if (m_webFrame->client()) { | 981 if (m_webFrame->client()) { |
| 982 m_webFrame->client()->suddenTerminationDisablerChanged( | 982 m_webFrame->client()->suddenTerminationDisablerChanged( |
| 983 present, static_cast<WebFrameClient::SuddenTerminationDisablerType>(
type)); | 983 present, static_cast<WebFrameClient::SuddenTerminationDisablerType>(
type)); |
| 984 } | 984 } |
| 985 } | 985 } |
| 986 | 986 |
| 987 } // namespace blink | 987 } // namespace blink |
| OLD | NEW |