Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(538)

Side by Side Diff: Source/web/FrameLoaderClientImpl.cpp

Issue 1046953003: Add the WebHistoryCommitType to didFailProvisionalLoad, part 2. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 5 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « Source/web/FrameLoaderClientImpl.h ('k') | Source/web/WebLocalFrameImpl.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 421 matching lines...) Expand 10 before | Expand all | Expand 10 after
432 m_webFrame->viewImpl()->didCommitLoad(commitType == StandardCommit, false); 432 m_webFrame->viewImpl()->didCommitLoad(commitType == StandardCommit, false);
433 if (m_webFrame->client()) 433 if (m_webFrame->client())
434 m_webFrame->client()->didCommitProvisionalLoad(m_webFrame, WebHistoryIte m(item), static_cast<WebHistoryCommitType>(commitType)); 434 m_webFrame->client()->didCommitProvisionalLoad(m_webFrame, WebHistoryIte m(item), static_cast<WebHistoryCommitType>(commitType));
435 // FIXME(dgozman): update this for out-of-process. 435 // FIXME(dgozman): update this for out-of-process.
436 WebDevToolsAgent* devToolsAgent = m_webFrame->top()->isWebLocalFrame() ? toW ebLocalFrameImpl(m_webFrame->top())->viewImpl()->devToolsAgent() : nullptr; 436 WebDevToolsAgent* devToolsAgent = m_webFrame->top()->isWebLocalFrame() ? toW ebLocalFrameImpl(m_webFrame->top())->viewImpl()->devToolsAgent() : nullptr;
437 if (devToolsAgent) 437 if (devToolsAgent)
438 static_cast<WebDevToolsAgentImpl*>(devToolsAgent)->didCommitLoadForLocal Frame(m_webFrame->frame()); 438 static_cast<WebDevToolsAgentImpl*>(devToolsAgent)->didCommitLoadForLocal Frame(m_webFrame->frame());
439 } 439 }
440 440
441 void FrameLoaderClientImpl::dispatchDidFailProvisionalLoad( 441 void FrameLoaderClientImpl::dispatchDidFailProvisionalLoad(
442 const ResourceError& error) 442 const ResourceError& error, HistoryCommitType commitType)
443 { 443 {
444 OwnPtr<WebPluginLoadObserver> observer = pluginLoadObserver(m_webFrame->fram e()->loader().provisionalDocumentLoader()); 444 OwnPtr<WebPluginLoadObserver> observer = pluginLoadObserver(m_webFrame->fram e()->loader().provisionalDocumentLoader());
445 m_webFrame->didFail(error, true); 445 m_webFrame->didFail(error, true, commitType);
446 if (observer) 446 if (observer)
447 observer->didFailLoading(error); 447 observer->didFailLoading(error);
448 } 448 }
449 449
450 void FrameLoaderClientImpl::dispatchDidFailLoad(const ResourceError& error) 450 void FrameLoaderClientImpl::dispatchDidFailLoad(const ResourceError& error, Hist oryCommitType commitType)
451 { 451 {
452 OwnPtr<WebPluginLoadObserver> observer = pluginLoadObserver(m_webFrame->fram e()->loader().documentLoader()); 452 OwnPtr<WebPluginLoadObserver> observer = pluginLoadObserver(m_webFrame->fram e()->loader().documentLoader());
453 m_webFrame->didFail(error, false); 453 m_webFrame->didFail(error, false, commitType);
454 if (observer) 454 if (observer)
455 observer->didFailLoading(error); 455 observer->didFailLoading(error);
456 456
457 // Don't clear the redirect chain, this will happen in the middle of client 457 // Don't clear the redirect chain, this will happen in the middle of client
458 // redirects, and we need the context. The chain will be cleared when the 458 // redirects, and we need the context. The chain will be cleared when the
459 // provisional load succeeds or fails, not the "real" one. 459 // provisional load succeeds or fails, not the "real" one.
460 } 460 }
461 461
462 void FrameLoaderClientImpl::dispatchDidFinishLoad() 462 void FrameLoaderClientImpl::dispatchDidFinishLoad()
463 { 463 {
(...skipping 505 matching lines...) Expand 10 before | Expand all | Expand 10 after
969 969
970 void FrameLoaderClientImpl::suddenTerminationDisablerChanged(bool present, Sudde nTerminationDisablerType type) 970 void FrameLoaderClientImpl::suddenTerminationDisablerChanged(bool present, Sudde nTerminationDisablerType type)
971 { 971 {
972 if (m_webFrame->client()) { 972 if (m_webFrame->client()) {
973 m_webFrame->client()->suddenTerminationDisablerChanged( 973 m_webFrame->client()->suddenTerminationDisablerChanged(
974 present, static_cast<WebFrameClient::SuddenTerminationDisablerType>( type)); 974 present, static_cast<WebFrameClient::SuddenTerminationDisablerType>( type));
975 } 975 }
976 } 976 }
977 977
978 } // namespace blink 978 } // namespace blink
OLDNEW
« no previous file with comments | « Source/web/FrameLoaderClientImpl.h ('k') | Source/web/WebLocalFrameImpl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698