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 49 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
60 #include "ScriptCallStackFactory.h" | 60 #include "ScriptCallStackFactory.h" |
61 #include "ScriptableDocumentParser.h" | 61 #include "ScriptableDocumentParser.h" |
62 #include "WebSocketFrame.h" | 62 #include "WebSocketFrame.h" |
63 #include "WebSocketHandshakeRequest.h" | 63 #include "WebSocketHandshakeRequest.h" |
64 #include "WebSocketHandshakeResponse.h" | 64 #include "WebSocketHandshakeResponse.h" |
65 #include "XMLHttpRequest.h" | 65 #include "XMLHttpRequest.h" |
66 | 66 |
67 #include <wtf/CurrentTime.h> | 67 #include <wtf/CurrentTime.h> |
68 #include <wtf/HexNumber.h> | 68 #include <wtf/HexNumber.h> |
69 #include <wtf/ListHashSet.h> | 69 #include <wtf/ListHashSet.h> |
70 #include <wtf/MemoryInstrumentationHashMap.h> | |
71 #include <wtf/RefPtr.h> | 70 #include <wtf/RefPtr.h> |
72 #include <wtf/text/StringBuilder.h> | 71 #include <wtf/text/StringBuilder.h> |
73 | 72 |
74 namespace WebCore { | 73 namespace WebCore { |
75 | 74 |
76 namespace ResourceAgentState { | 75 namespace ResourceAgentState { |
77 static const char resourceAgentEnabled[] = "resourceAgentEnabled"; | 76 static const char resourceAgentEnabled[] = "resourceAgentEnabled"; |
78 static const char extraRequestHeaders[] = "extraRequestHeaders"; | 77 static const char extraRequestHeaders[] = "extraRequestHeaders"; |
79 static const char cacheDisabled[] = "cacheDisabled"; | 78 static const char cacheDisabled[] = "cacheDisabled"; |
80 static const char userAgentOverride[] = "userAgentOverride"; | 79 static const char userAgentOverride[] = "userAgentOverride"; |
(...skipping 556 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
637 } | 636 } |
638 | 637 |
639 void InspectorResourceAgent::mainFrameNavigated(DocumentLoader* loader) | 638 void InspectorResourceAgent::mainFrameNavigated(DocumentLoader* loader) |
640 { | 639 { |
641 if (m_state->getBoolean(ResourceAgentState::cacheDisabled)) | 640 if (m_state->getBoolean(ResourceAgentState::cacheDisabled)) |
642 memoryCache()->evictResources(); | 641 memoryCache()->evictResources(); |
643 | 642 |
644 m_resourcesData->clear(m_pageAgent->loaderId(loader)); | 643 m_resourcesData->clear(m_pageAgent->loaderId(loader)); |
645 } | 644 } |
646 | 645 |
647 void InspectorResourceAgent::reportMemoryUsage(MemoryObjectInfo* memoryObjectInf
o) const | |
648 { | |
649 MemoryClassInfo info(memoryObjectInfo, this, WebCoreMemoryTypes::InspectorRe
sourceAgent); | |
650 InspectorBaseAgent<InspectorResourceAgent>::reportMemoryUsage(memoryObjectIn
fo); | |
651 info.addWeakPointer(m_pageAgent); | |
652 info.addWeakPointer(m_client); | |
653 info.addWeakPointer(m_frontend); | |
654 info.addMember(m_userAgentOverride, "userAgentOverride"); | |
655 info.addMember(m_resourcesData, "resourcesData"); | |
656 info.addMember(m_pendingXHRReplayData, "pendingXHRReplayData"); | |
657 info.addMember(m_styleRecalculationInitiator, "styleRecalculationInitiator")
; | |
658 } | |
659 | |
660 InspectorResourceAgent::InspectorResourceAgent(InstrumentingAgents* instrumentin
gAgents, InspectorPageAgent* pageAgent, InspectorClient* client, InspectorCompos
iteState* state) | 646 InspectorResourceAgent::InspectorResourceAgent(InstrumentingAgents* instrumentin
gAgents, InspectorPageAgent* pageAgent, InspectorClient* client, InspectorCompos
iteState* state) |
661 : InspectorBaseAgent<InspectorResourceAgent>("Network", instrumentingAgents,
state) | 647 : InspectorBaseAgent<InspectorResourceAgent>("Network", instrumentingAgents,
state) |
662 , m_pageAgent(pageAgent) | 648 , m_pageAgent(pageAgent) |
663 , m_client(client) | 649 , m_client(client) |
664 , m_frontend(0) | 650 , m_frontend(0) |
665 , m_resourcesData(adoptPtr(new NetworkResourcesData())) | 651 , m_resourcesData(adoptPtr(new NetworkResourcesData())) |
666 , m_loadingXHRSynchronously(false) | 652 , m_loadingXHRSynchronously(false) |
667 , m_isRecalculatingStyle(false) | 653 , m_isRecalculatingStyle(false) |
668 { | 654 { |
669 } | 655 } |
670 | 656 |
671 } // namespace WebCore | 657 } // namespace WebCore |
672 | 658 |
OLD | NEW |