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

Side by Side Diff: third_party/WebKit/Source/core/loader/FrameLoader.cpp

Issue 2727633006: DevTools: Rename InspectorInstrumentation:: namespace into probe:: (Closed)
Patch Set: Created 3 years, 9 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
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc. All rights 2 * Copyright (C) 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc. All rights
3 * reserved. 3 * reserved.
4 * Copyright (C) 2008 Nokia Corporation and/or its subsidiary(-ies) 4 * Copyright (C) 2008 Nokia Corporation and/or its subsidiary(-ies)
5 * Copyright (C) 2008, 2009 Torch Mobile Inc. All rights reserved. 5 * Copyright (C) 2008, 2009 Torch Mobile Inc. All rights reserved.
6 * (http://www.torchmobile.com/) 6 * (http://www.torchmobile.com/)
7 * Copyright (C) 2008 Alp Toker <alp@atoker.com> 7 * Copyright (C) 2008 Alp Toker <alp@atoker.com>
8 * Copyright (C) Research In Motion Limited 2009. All rights reserved. 8 * Copyright (C) Research In Motion Limited 2009. All rights reserved.
9 * Copyright (C) 2011 Kris Jordan <krisjordan@gmail.com> 9 * Copyright (C) 2011 Kris Jordan <krisjordan@gmail.com>
10 * Copyright (C) 2011 Google Inc. All rights reserved. 10 * Copyright (C) 2011 Google Inc. All rights reserved.
(...skipping 481 matching lines...) Expand 10 before | Expand all | Expand 10 after
492 WebLoadingBehaviorServiceWorkerControlled); 492 WebLoadingBehaviorServiceWorkerControlled);
493 } 493 }
494 494
495 // Links with media values need more information (like viewport information). 495 // Links with media values need more information (like viewport information).
496 // This happens after the first chunk is parsed in HTMLDocumentParser. 496 // This happens after the first chunk is parsed in HTMLDocumentParser.
497 m_documentLoader->dispatchLinkHeaderPreloads(nullptr, 497 m_documentLoader->dispatchLinkHeaderPreloads(nullptr,
498 LinkLoader::OnlyLoadNonMedia); 498 LinkLoader::OnlyLoadNonMedia);
499 499
500 TRACE_EVENT1("devtools.timeline", "CommitLoad", "data", 500 TRACE_EVENT1("devtools.timeline", "CommitLoad", "data",
501 InspectorCommitLoadEvent::data(m_frame)); 501 InspectorCommitLoadEvent::data(m_frame));
502 InspectorInstrumentation::didCommitLoad(m_frame, m_documentLoader.get()); 502 probe::didCommitLoad(m_frame, m_documentLoader.get());
503 m_frame->page()->didCommitLoad(m_frame); 503 m_frame->page()->didCommitLoad(m_frame);
504 dispatchDidClearDocumentOfWindowObject(); 504 dispatchDidClearDocumentOfWindowObject();
505 505
506 takeObjectSnapshot(); 506 takeObjectSnapshot();
507 } 507 }
508 508
509 void FrameLoader::didInstallNewDocument(bool dispatchWindowObjectAvailable) { 509 void FrameLoader::didInstallNewDocument(bool dispatchWindowObjectAvailable) {
510 DCHECK(m_frame); 510 DCHECK(m_frame);
511 DCHECK(m_frame->document()); 511 DCHECK(m_frame->document());
512 512
(...skipping 963 matching lines...) Expand 10 before | Expand all | Expand 10 after
1476 if (ScrollingCoordinator* scrollingCoordinator = 1476 if (ScrollingCoordinator* scrollingCoordinator =
1477 m_frame->page()->scrollingCoordinator()) 1477 m_frame->page()->scrollingCoordinator())
1478 scrollingCoordinator->frameViewRootLayerDidChange(view); 1478 scrollingCoordinator->frameViewRootLayerDidChange(view);
1479 } 1479 }
1480 1480
1481 documentLoader()->initialScrollState().didRestoreFromHistory = true; 1481 documentLoader()->initialScrollState().didRestoreFromHistory = true;
1482 } 1482 }
1483 1483
1484 String FrameLoader::userAgent() const { 1484 String FrameLoader::userAgent() const {
1485 String userAgent = client()->userAgent(); 1485 String userAgent = client()->userAgent();
1486 InspectorInstrumentation::applyUserAgentOverride(m_frame, &userAgent); 1486 probe::applyUserAgentOverride(m_frame, &userAgent);
1487 return userAgent; 1487 return userAgent;
1488 } 1488 }
1489 1489
1490 void FrameLoader::detach() { 1490 void FrameLoader::detach() {
1491 detachDocumentLoader(m_documentLoader); 1491 detachDocumentLoader(m_documentLoader);
1492 detachDocumentLoader(m_provisionalDocumentLoader); 1492 detachDocumentLoader(m_provisionalDocumentLoader);
1493 1493
1494 Frame* parent = m_frame->tree().parent(); 1494 Frame* parent = m_frame->tree().parent();
1495 if (parent && parent->isLocalFrame()) 1495 if (parent && parent->isLocalFrame())
1496 toLocalFrame(parent)->loader().scheduleCheckCompleted(); 1496 toLocalFrame(parent)->loader().scheduleCheckCompleted();
(...skipping 318 matching lines...) Expand 10 before | Expand all | Expand 10 after
1815 // We should get rid of the dependency on the DocumentLoader in consumers of 1815 // We should get rid of the dependency on the DocumentLoader in consumers of
1816 // the didStartProvisionalLoad() notification. 1816 // the didStartProvisionalLoad() notification.
1817 client()->dispatchDidStartProvisionalLoad(m_provisionalDocumentLoader); 1817 client()->dispatchDidStartProvisionalLoad(m_provisionalDocumentLoader);
1818 DCHECK(m_provisionalDocumentLoader); 1818 DCHECK(m_provisionalDocumentLoader);
1819 1819
1820 m_provisionalDocumentLoader->startLoadingMainResource(); 1820 m_provisionalDocumentLoader->startLoadingMainResource();
1821 1821
1822 // This should happen after the request is sent, so we don't use 1822 // This should happen after the request is sent, so we don't use
1823 // clearNavigationHandledByClient() above. 1823 // clearNavigationHandledByClient() above.
1824 if (isNavigationHandledByClient) 1824 if (isNavigationHandledByClient)
1825 InspectorInstrumentation::frameClearedScheduledClientNavigation(m_frame); 1825 probe::frameClearedScheduledClientNavigation(m_frame);
1826 1826
1827 takeObjectSnapshot(); 1827 takeObjectSnapshot();
1828 } 1828 }
1829 1829
1830 void FrameLoader::applyUserAgent(ResourceRequest& request) { 1830 void FrameLoader::applyUserAgent(ResourceRequest& request) {
1831 String userAgent = this->userAgent(); 1831 String userAgent = this->userAgent();
1832 DCHECK(!userAgent.isNull()); 1832 DCHECK(!userAgent.isNull());
1833 request.setHTTPUserAgent(AtomicString(userAgent)); 1833 request.setHTTPUserAgent(AtomicString(userAgent));
1834 } 1834 }
1835 1835
(...skipping 23 matching lines...) Expand all
1859 void FrameLoader::dispatchDidClearDocumentOfWindowObject() { 1859 void FrameLoader::dispatchDidClearDocumentOfWindowObject() {
1860 DCHECK(m_frame->document()); 1860 DCHECK(m_frame->document());
1861 if (!m_frame->document()->canExecuteScripts(NotAboutToExecuteScript)) 1861 if (!m_frame->document()->canExecuteScripts(NotAboutToExecuteScript))
1862 return; 1862 return;
1863 1863
1864 Settings* settings = m_frame->settings(); 1864 Settings* settings = m_frame->settings();
1865 if (settings && settings->getForceMainWorldInitialization()) { 1865 if (settings && settings->getForceMainWorldInitialization()) {
1866 // Forcibly instantiate WindowProxy. 1866 // Forcibly instantiate WindowProxy.
1867 m_frame->script().windowProxy(DOMWrapperWorld::mainWorld()); 1867 m_frame->script().windowProxy(DOMWrapperWorld::mainWorld());
1868 } 1868 }
1869 InspectorInstrumentation::didClearDocumentOfWindowObject(m_frame); 1869 probe::didClearDocumentOfWindowObject(m_frame);
1870 1870
1871 if (m_dispatchingDidClearWindowObjectInMainWorld) 1871 if (m_dispatchingDidClearWindowObjectInMainWorld)
1872 return; 1872 return;
1873 AutoReset<bool> inDidClearWindowObject( 1873 AutoReset<bool> inDidClearWindowObject(
1874 &m_dispatchingDidClearWindowObjectInMainWorld, true); 1874 &m_dispatchingDidClearWindowObjectInMainWorld, true);
1875 // We just cleared the document, not the entire window object, but for the 1875 // We just cleared the document, not the entire window object, but for the
1876 // embedder that's close enough. 1876 // embedder that's close enough.
1877 client()->dispatchDidClearWindowObjectInMainWorld(); 1877 client()->dispatchDidClearWindowObjectInMainWorld();
1878 } 1878 }
1879 1879
(...skipping 145 matching lines...) Expand 10 before | Expand all | Expand 10 after
2025 2025
2026 loader->setLoadType(loadType); 2026 loader->setLoadType(loadType);
2027 loader->setNavigationType(navigationType); 2027 loader->setNavigationType(navigationType);
2028 loader->setReplacesCurrentHistoryItem(loadType == 2028 loader->setReplacesCurrentHistoryItem(loadType ==
2029 FrameLoadTypeReplaceCurrentItem); 2029 FrameLoadTypeReplaceCurrentItem);
2030 return loader; 2030 return loader;
2031 } 2031 }
2032 2032
2033 void FrameLoader::setNavigationHandledByClient() { 2033 void FrameLoader::setNavigationHandledByClient() {
2034 m_isNavigationHandledByClient = true; 2034 m_isNavigationHandledByClient = true;
2035 InspectorInstrumentation::frameScheduledClientNavigation(m_frame); 2035 probe::frameScheduledClientNavigation(m_frame);
2036 } 2036 }
2037 2037
2038 void FrameLoader::clearNavigationHandledByClient() { 2038 void FrameLoader::clearNavigationHandledByClient() {
2039 m_isNavigationHandledByClient = false; 2039 m_isNavigationHandledByClient = false;
2040 InspectorInstrumentation::frameClearedScheduledClientNavigation(m_frame); 2040 probe::frameClearedScheduledClientNavigation(m_frame);
2041 } 2041 }
2042 2042
2043 } // namespace blink 2043 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/loader/FrameFetchContext.cpp ('k') | third_party/WebKit/Source/core/loader/ImageLoader.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698