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

Side by Side Diff: Source/core/inspector/InspectorResourceAgent.cpp

Issue 301983003: Make Inspector aware of RemoteFrames in FrameTree (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Fixed a cast problem Created 6 years, 6 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) 2011 Google Inc. All rights reserved. 2 * Copyright (C) 2011 Google Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions are 5 * modification, are permitted provided that the following conditions are
6 * met: 6 * met:
7 * 7 *
8 * * Redistributions of source code must retain the above copyright 8 * * Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * * Redistributions in binary form must reproduce the above 10 * * Redistributions in binary form must reproduce the above
(...skipping 700 matching lines...) Expand 10 before | Expand all | Expand 10 after
711 void InspectorResourceAgent::canClearBrowserCookies(ErrorString*, bool* result) 711 void InspectorResourceAgent::canClearBrowserCookies(ErrorString*, bool* result)
712 { 712 {
713 *result = true; 713 *result = true;
714 } 714 }
715 715
716 void InspectorResourceAgent::setCacheDisabled(ErrorString*, bool cacheDisabled) 716 void InspectorResourceAgent::setCacheDisabled(ErrorString*, bool cacheDisabled)
717 { 717 {
718 m_state->setBoolean(ResourceAgentState::cacheDisabled, cacheDisabled); 718 m_state->setBoolean(ResourceAgentState::cacheDisabled, cacheDisabled);
719 if (cacheDisabled) 719 if (cacheDisabled)
720 memoryCache()->evictResources(); 720 memoryCache()->evictResources();
721 for (LocalFrame* frame = m_pageAgent->mainFrame(); frame; frame = frame->tre e().traverseNext()) 721 for (Frame* frame = m_pageAgent->mainFrame(); frame; frame = frame->tree().t raverseNext()) {
722 frame->document()->fetcher()->garbageCollectDocumentResources(); 722 if (frame->isLocalFrame())
723 toLocalFrame(frame)->document()->fetcher()->garbageCollectDocumentRe sources();
724 }
723 } 725 }
724 726
725 void InspectorResourceAgent::loadResourceForFrontend(ErrorString* errorString, c onst String& frameId, const String& url, const RefPtr<JSONObject>* requestHeader s, PassRefPtr<LoadResourceForFrontendCallback> prpCallback) 727 void InspectorResourceAgent::loadResourceForFrontend(ErrorString* errorString, c onst String& frameId, const String& url, const RefPtr<JSONObject>* requestHeader s, PassRefPtr<LoadResourceForFrontendCallback> prpCallback)
726 { 728 {
727 RefPtr<LoadResourceForFrontendCallback> callback = prpCallback; 729 RefPtr<LoadResourceForFrontendCallback> callback = prpCallback;
728 LocalFrame* frame = m_pageAgent->assertFrame(errorString, frameId); 730 LocalFrame* frame = m_pageAgent->assertFrame(errorString, frameId);
729 if (!frame) 731 if (!frame)
730 return; 732 return;
731 733
732 Document* document = frame->document(); 734 Document* document = frame->document();
(...skipping 79 matching lines...) Expand 10 before | Expand all | Expand 10 after
812 InspectorResourceAgent::InspectorResourceAgent(InspectorPageAgent* pageAgent) 814 InspectorResourceAgent::InspectorResourceAgent(InspectorPageAgent* pageAgent)
813 : InspectorBaseAgent<InspectorResourceAgent>("Network") 815 : InspectorBaseAgent<InspectorResourceAgent>("Network")
814 , m_pageAgent(pageAgent) 816 , m_pageAgent(pageAgent)
815 , m_frontend(0) 817 , m_frontend(0)
816 , m_resourcesData(adoptPtr(new NetworkResourcesData())) 818 , m_resourcesData(adoptPtr(new NetworkResourcesData()))
817 , m_isRecalculatingStyle(false) 819 , m_isRecalculatingStyle(false)
818 { 820 {
819 } 821 }
820 822
821 } // namespace WebCore 823 } // namespace WebCore
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698