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

Unified Diff: Source/core/inspector/InspectorPageAgent.cpp

Issue 31063004: Have Frame::loader() return a reference (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 7 years, 2 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « Source/core/inspector/InspectorOverlay.cpp ('k') | Source/core/loader/CookieJar.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/inspector/InspectorPageAgent.cpp
diff --git a/Source/core/inspector/InspectorPageAgent.cpp b/Source/core/inspector/InspectorPageAgent.cpp
index b91c40a3d1fe1c1f70aa1993886e5317ac59ecef..e05591a6399644dc78e58b2b38dcb5df89a976de 100644
--- a/Source/core/inspector/InspectorPageAgent.cpp
+++ b/Source/core/inspector/InspectorPageAgent.cpp
@@ -444,7 +444,7 @@ void InspectorPageAgent::reload(ErrorString*, const bool* const optionalIgnoreCa
{
m_pendingScriptToEvaluateOnLoadOnce = optionalScriptToEvaluateOnLoad ? *optionalScriptToEvaluateOnLoad : "";
m_pendingScriptPreprocessor = optionalScriptPreprocessor ? *optionalScriptPreprocessor : "";
- m_page->mainFrame()->loader()->reload(optionalIgnoreCache && *optionalIgnoreCache ? EndToEndReload : NormalReload);
+ m_page->mainFrame()->loader().reload(optionalIgnoreCache && *optionalIgnoreCache ? EndToEndReload : NormalReload);
}
void InspectorPageAgent::navigate(ErrorString*, const String& url)
@@ -452,7 +452,7 @@ void InspectorPageAgent::navigate(ErrorString*, const String& url)
UserGestureIndicator indicator(DefinitelyProcessingNewUserGesture);
Frame* frame = m_page->mainFrame();
FrameLoadRequest request(frame->document()->securityOrigin(), ResourceRequest(frame->document()->completeURL(url)));
- frame->loader()->load(request);
+ frame->loader().load(request);
}
void InspectorPageAgent::getNavigationHistory(ErrorString*, int*, RefPtr<TypeBuilder::Array<TypeBuilder::Page::NavigationEntry> >&)
@@ -523,7 +523,7 @@ static Vector<KURL> allResourcesURLsForFrame(Frame* frame)
{
Vector<KURL> result;
- result.append(urlWithoutFragment(frame->loader()->documentLoader()->url()));
+ result.append(urlWithoutFragment(frame->loader().documentLoader()->url()));
Vector<Resource*> allResources = cachedResourcesForFrame(frame);
for (Vector<Resource*>::const_iterator it = allResources.begin(); it != allResources.end(); ++it)
@@ -598,7 +598,7 @@ void InspectorPageAgent::searchInResource(ErrorString*, const String& frameId, c
Frame* frame = frameForId(frameId);
KURL kurl(ParsedURLString, url);
- FrameLoader* frameLoader = frame ? frame->loader() : 0;
+ FrameLoader* frameLoader = frame ? &frame->loader() : 0;
DocumentLoader* loader = frameLoader ? frameLoader->documentLoader() : 0;
if (!loader)
return;
@@ -936,8 +936,7 @@ String InspectorPageAgent::resourceSourceMapURL(const String& url)
// static
DocumentLoader* InspectorPageAgent::assertDocumentLoader(ErrorString* errorString, Frame* frame)
{
- FrameLoader* frameLoader = frame->loader();
- DocumentLoader* documentLoader = frameLoader ? frameLoader->documentLoader() : 0;
+ DocumentLoader* documentLoader = frame->loader().documentLoader();
if (!documentLoader)
*errorString = "No documentLoader for given frame found";
return documentLoader;
@@ -1034,9 +1033,9 @@ PassRefPtr<TypeBuilder::Page::Frame> InspectorPageAgent::buildObjectForFrame(Fra
{
RefPtr<TypeBuilder::Page::Frame> frameObject = TypeBuilder::Page::Frame::create()
.setId(frameId(frame))
- .setLoaderId(loaderId(frame->loader()->documentLoader()))
+ .setLoaderId(loaderId(frame->loader().documentLoader()))
.setUrl(urlWithoutFragment(frame->document()->url()).string())
- .setMimeType(frame->loader()->documentLoader()->responseMIMEType())
+ .setMimeType(frame->loader().documentLoader()->responseMIMEType())
.setSecurityOrigin(frame->document()->securityOrigin()->toRawString());
if (frame->tree().parent())
frameObject->setParentId(frameId(frame->tree().parent()));
« no previous file with comments | « Source/core/inspector/InspectorOverlay.cpp ('k') | Source/core/loader/CookieJar.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698