Chromium Code Reviews| 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 431 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 442 } | 442 } |
| 443 | 443 |
| 444 void FrameLoaderClientImpl::dispatchDidReceiveServerRedirectForProvisionalLoad() | 444 void FrameLoaderClientImpl::dispatchDidReceiveServerRedirectForProvisionalLoad() |
| 445 { | 445 { |
| 446 if (m_webFrame->client()) | 446 if (m_webFrame->client()) |
| 447 m_webFrame->client()->didReceiveServerRedirectForProvisionalLoad(m_webFr ame); | 447 m_webFrame->client()->didReceiveServerRedirectForProvisionalLoad(m_webFr ame); |
| 448 } | 448 } |
| 449 | 449 |
| 450 void FrameLoaderClientImpl::dispatchDidNavigateWithinPage(HistoryItem* item, His toryCommitType commitType) | 450 void FrameLoaderClientImpl::dispatchDidNavigateWithinPage(HistoryItem* item, His toryCommitType commitType) |
| 451 { | 451 { |
| 452 bool shouldCreateHistoryEntry = commitType == StandardCommit; | 452 m_webFrame->viewImpl()->didCommitLoad(commitType, true); |
| 453 m_webFrame->viewImpl()->didCommitLoad(shouldCreateHistoryEntry, true); | |
| 454 if (m_webFrame->client()) | 453 if (m_webFrame->client()) |
| 455 m_webFrame->client()->didNavigateWithinPage(m_webFrame, WebHistoryItem(i tem), static_cast<WebHistoryCommitType>(commitType)); | 454 m_webFrame->client()->didNavigateWithinPage(m_webFrame, WebHistoryItem(i tem), static_cast<WebHistoryCommitType>(commitType)); |
| 456 } | 455 } |
| 457 | 456 |
| 458 void FrameLoaderClientImpl::dispatchWillClose() | 457 void FrameLoaderClientImpl::dispatchWillClose() |
| 459 { | 458 { |
| 460 if (m_webFrame->client()) | 459 if (m_webFrame->client()) |
| 461 m_webFrame->client()->willClose(m_webFrame); | 460 m_webFrame->client()->willClose(m_webFrame); |
| 462 } | 461 } |
| 463 | 462 |
| (...skipping 10 matching lines...) Expand all Loading... | |
| 474 } | 473 } |
| 475 | 474 |
| 476 void FrameLoaderClientImpl::dispatchDidChangeIcons(IconType type) | 475 void FrameLoaderClientImpl::dispatchDidChangeIcons(IconType type) |
| 477 { | 476 { |
| 478 if (m_webFrame->client()) | 477 if (m_webFrame->client()) |
| 479 m_webFrame->client()->didChangeIcon(m_webFrame, static_cast<WebIconURL:: Type>(type)); | 478 m_webFrame->client()->didChangeIcon(m_webFrame, static_cast<WebIconURL:: Type>(type)); |
| 480 } | 479 } |
| 481 | 480 |
| 482 void FrameLoaderClientImpl::dispatchDidCommitLoad(HistoryItem* item, HistoryComm itType commitType) | 481 void FrameLoaderClientImpl::dispatchDidCommitLoad(HistoryItem* item, HistoryComm itType commitType) |
| 483 { | 482 { |
| 484 m_webFrame->viewImpl()->didCommitLoad(commitType == StandardCommit, false); | 483 m_webFrame->viewImpl()->didCommitLoad(commitType, false); |
|
dglazkov
2016/01/15 19:41:48
The bug is here. WebViewImpl::didCommitLoad only e
esprehn
2016/01/15 22:15:31
It should be trivial to write a test for this with
wychen
2016/01/15 22:31:02
Done.
wychen
2016/01/15 22:31:02
Could you elaborate a bit, or show me an example?
| |
| 485 | 484 |
| 486 // Save some histogram data so we can compute the average memory used per | 485 // Save some histogram data so we can compute the average memory used per |
| 487 // page load of the glyphs. | 486 // page load of the glyphs. |
| 488 // TODO(esprehn): Is this ancient uma actually useful? | 487 // TODO(esprehn): Is this ancient uma actually useful? |
| 489 Platform::current()->histogramCustomCounts("Memory.GlyphPagesPerLoad", Glyph PageTreeNode::treeGlyphPageCount(), 1, 10000, 50); | 488 Platform::current()->histogramCustomCounts("Memory.GlyphPagesPerLoad", Glyph PageTreeNode::treeGlyphPageCount(), 1, 10000, 50); |
| 490 | 489 |
| 491 if (m_webFrame->client()) | 490 if (m_webFrame->client()) |
| 492 m_webFrame->client()->didCommitProvisionalLoad(m_webFrame, WebHistoryIte m(item), static_cast<WebHistoryCommitType>(commitType)); | 491 m_webFrame->client()->didCommitProvisionalLoad(m_webFrame, WebHistoryIte m(item), static_cast<WebHistoryCommitType>(commitType)); |
| 493 WebDevToolsAgentImpl* devToolsAgent = WebLocalFrameImpl::fromFrame(m_webFram e->frame()->localFrameRoot())->devToolsAgentImpl(); | 492 WebDevToolsAgentImpl* devToolsAgent = WebLocalFrameImpl::fromFrame(m_webFram e->frame()->localFrameRoot())->devToolsAgentImpl(); |
| 494 if (devToolsAgent) | 493 if (devToolsAgent) |
| (...skipping 506 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1001 | 1000 |
| 1002 void FrameLoaderClientImpl::suddenTerminationDisablerChanged(bool present, Sudde nTerminationDisablerType type) | 1001 void FrameLoaderClientImpl::suddenTerminationDisablerChanged(bool present, Sudde nTerminationDisablerType type) |
| 1003 { | 1002 { |
| 1004 if (m_webFrame->client()) { | 1003 if (m_webFrame->client()) { |
| 1005 m_webFrame->client()->suddenTerminationDisablerChanged( | 1004 m_webFrame->client()->suddenTerminationDisablerChanged( |
| 1006 present, static_cast<WebFrameClient::SuddenTerminationDisablerType>( type)); | 1005 present, static_cast<WebFrameClient::SuddenTerminationDisablerType>( type)); |
| 1007 } | 1006 } |
| 1008 } | 1007 } |
| 1009 | 1008 |
| 1010 } // namespace blink | 1009 } // namespace blink |
| OLD | NEW |