| OLD | NEW |
| 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 Loading... |
| 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 Loading... |
| 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 |
| OLD | NEW |