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

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

Issue 338993006: DevTools: pass agent host id to the renderer (Blink). (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Same w/ reattach. 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 | Annotate | Revision Log
« no previous file with comments | « Source/core/inspector/InspectorResourceAgent.h ('k') | Source/web/WebDevToolsAgentImpl.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) 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 775 matching lines...) Expand 10 before | Expand all | Expand 10 after
786 { 786 {
787 RefPtr<TypeBuilder::Network::Initiator> initiator = buildInitiatorObject(fra me->document(), FetchInitiatorInfo()); 787 RefPtr<TypeBuilder::Network::Initiator> initiator = buildInitiatorObject(fra me->document(), FetchInitiatorInfo());
788 m_frameNavigationInitiatorMap.set(m_pageAgent->frameId(frame), initiator); 788 m_frameNavigationInitiatorMap.set(m_pageAgent->frameId(frame), initiator);
789 } 789 }
790 790
791 void InspectorResourceAgent::frameClearedScheduledNavigation(LocalFrame* frame) 791 void InspectorResourceAgent::frameClearedScheduledNavigation(LocalFrame* frame)
792 { 792 {
793 m_frameNavigationInitiatorMap.remove(m_pageAgent->frameId(frame)); 793 m_frameNavigationInitiatorMap.remove(m_pageAgent->frameId(frame));
794 } 794 }
795 795
796 void InspectorResourceAgent::setHostId(const String& hostId)
797 {
798 m_hostId = hostId;
799 }
800
796 bool InspectorResourceAgent::fetchResourceContent(LocalFrame* frame, const KURL& url, String* content, bool* base64Encoded) 801 bool InspectorResourceAgent::fetchResourceContent(LocalFrame* frame, const KURL& url, String* content, bool* base64Encoded)
797 { 802 {
798 // First try to fetch content from the cached resource. 803 // First try to fetch content from the cached resource.
799 Resource* cachedResource = frame->document()->fetcher()->cachedResource(url) ; 804 Resource* cachedResource = frame->document()->fetcher()->cachedResource(url) ;
800 if (!cachedResource) 805 if (!cachedResource)
801 cachedResource = memoryCache()->resourceForURL(url); 806 cachedResource = memoryCache()->resourceForURL(url);
802 if (cachedResource && InspectorPageAgent::cachedResourceContent(cachedResour ce, content, base64Encoded)) 807 if (cachedResource && InspectorPageAgent::cachedResourceContent(cachedResour ce, content, base64Encoded))
803 return true; 808 return true;
804 809
805 // Then fall back to resource data. 810 // Then fall back to resource data.
(...skipping 11 matching lines...) Expand all
817 InspectorResourceAgent::InspectorResourceAgent(InspectorPageAgent* pageAgent) 822 InspectorResourceAgent::InspectorResourceAgent(InspectorPageAgent* pageAgent)
818 : InspectorBaseAgent<InspectorResourceAgent>("Network") 823 : InspectorBaseAgent<InspectorResourceAgent>("Network")
819 , m_pageAgent(pageAgent) 824 , m_pageAgent(pageAgent)
820 , m_frontend(0) 825 , m_frontend(0)
821 , m_resourcesData(adoptPtr(new NetworkResourcesData())) 826 , m_resourcesData(adoptPtr(new NetworkResourcesData()))
822 , m_isRecalculatingStyle(false) 827 , m_isRecalculatingStyle(false)
823 { 828 {
824 } 829 }
825 830
826 } // namespace WebCore 831 } // namespace WebCore
OLDNEW
« no previous file with comments | « Source/core/inspector/InspectorResourceAgent.h ('k') | Source/web/WebDevToolsAgentImpl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698