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 698 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
709 void InspectorResourceAgent::clearBrowserCookies(ErrorString*) | 709 void InspectorResourceAgent::clearBrowserCookies(ErrorString*) |
710 { | 710 { |
711 m_client->clearBrowserCookies(); | 711 m_client->clearBrowserCookies(); |
712 } | 712 } |
713 | 713 |
714 void InspectorResourceAgent::setCacheDisabled(ErrorString*, bool cacheDisabled) | 714 void InspectorResourceAgent::setCacheDisabled(ErrorString*, bool cacheDisabled) |
715 { | 715 { |
716 m_state->setBoolean(ResourceAgentState::cacheDisabled, cacheDisabled); | 716 m_state->setBoolean(ResourceAgentState::cacheDisabled, cacheDisabled); |
717 if (cacheDisabled) | 717 if (cacheDisabled) |
718 memoryCache()->evictResources(); | 718 memoryCache()->evictResources(); |
| 719 for (Frame* frame = m_pageAgent->mainFrame(); frame; frame = frame->tree().t
raverseNext()) |
| 720 frame->document()->fetcher()->garbageCollectDocumentResources(); |
719 } | 721 } |
720 | 722 |
721 void InspectorResourceAgent::loadResourceForFrontend(ErrorString* errorString, c
onst String& frameId, const String& url, const RefPtr<JSONObject>* requestHeader
s, PassRefPtr<LoadResourceForFrontendCallback> prpCallback) | 723 void InspectorResourceAgent::loadResourceForFrontend(ErrorString* errorString, c
onst String& frameId, const String& url, const RefPtr<JSONObject>* requestHeader
s, PassRefPtr<LoadResourceForFrontendCallback> prpCallback) |
722 { | 724 { |
723 RefPtr<LoadResourceForFrontendCallback> callback = prpCallback; | 725 RefPtr<LoadResourceForFrontendCallback> callback = prpCallback; |
724 Frame* frame = m_pageAgent->assertFrame(errorString, frameId); | 726 Frame* frame = m_pageAgent->assertFrame(errorString, frameId); |
725 if (!frame) | 727 if (!frame) |
726 return; | 728 return; |
727 | 729 |
728 Document* document = frame->document(); | 730 Document* document = frame->document(); |
(...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
809 : InspectorBaseAgent<InspectorResourceAgent>("Network") | 811 : InspectorBaseAgent<InspectorResourceAgent>("Network") |
810 , m_pageAgent(pageAgent) | 812 , m_pageAgent(pageAgent) |
811 , m_client(client) | 813 , m_client(client) |
812 , m_frontend(0) | 814 , m_frontend(0) |
813 , m_resourcesData(adoptPtr(new NetworkResourcesData())) | 815 , m_resourcesData(adoptPtr(new NetworkResourcesData())) |
814 , m_isRecalculatingStyle(false) | 816 , m_isRecalculatingStyle(false) |
815 { | 817 { |
816 } | 818 } |
817 | 819 |
818 } // namespace WebCore | 820 } // namespace WebCore |
OLD | NEW |