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 705 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
716 | 716 |
717 if (m_state->getBoolean(ResourceAgentState::cacheDisabled)) | 717 if (m_state->getBoolean(ResourceAgentState::cacheDisabled)) |
718 memoryCache()->evictResources(); | 718 memoryCache()->evictResources(); |
719 | 719 |
720 m_resourcesData->clear(m_pageAgent->loaderId(loader)); | 720 m_resourcesData->clear(m_pageAgent->loaderId(loader)); |
721 } | 721 } |
722 | 722 |
723 void InspectorResourceAgent::reportMemoryUsage(MemoryObjectInfo* memoryObjectInf
o) const | 723 void InspectorResourceAgent::reportMemoryUsage(MemoryObjectInfo* memoryObjectInf
o) const |
724 { | 724 { |
725 MemoryClassInfo info(memoryObjectInfo, this, WebCoreMemoryTypes::InspectorRe
sourceAgent); | 725 MemoryClassInfo info(memoryObjectInfo, this, WebCoreMemoryTypes::InspectorRe
sourceAgent); |
726 InspectorBaseAgent<InspectorResourceAgent>::reportMemoryUsage(memoryObjectIn
fo); | 726 InspectorBaseAgent::reportMemoryUsage(memoryObjectInfo); |
727 info.addWeakPointer(m_pageAgent); | 727 info.addWeakPointer(m_pageAgent.get()); |
728 info.addWeakPointer(m_client); | 728 info.addWeakPointer(m_client); |
729 info.addWeakPointer(m_frontend); | 729 info.addWeakPointer(m_frontend); |
730 info.addMember(m_userAgentOverride, "userAgentOverride"); | 730 info.addMember(m_userAgentOverride, "userAgentOverride"); |
731 info.addMember(m_resourcesData, "resourcesData"); | 731 info.addMember(m_resourcesData, "resourcesData"); |
732 info.addMember(m_pendingXHRReplayData, "pendingXHRReplayData"); | 732 info.addMember(m_pendingXHRReplayData, "pendingXHRReplayData"); |
733 info.addMember(m_styleRecalculationInitiator, "styleRecalculationInitiator")
; | 733 info.addMember(m_styleRecalculationInitiator, "styleRecalculationInitiator")
; |
734 } | 734 } |
735 | 735 |
736 InspectorResourceAgent::InspectorResourceAgent(InstrumentingAgents* instrumentin
gAgents, InspectorPageAgent* pageAgent, InspectorClient* client, InspectorCompos
iteState* state) | 736 PassRefPtr<InspectorResourceAgent> InspectorResourceAgent::create(InstrumentingA
gents* instrumentingAgents, InspectorState* state, PassRefPtr<InspectorPageAgent
> pageAgent, InspectorClient* client) |
737 : InspectorBaseAgent<InspectorResourceAgent>("Network", instrumentingAgents,
state) | 737 { |
| 738 return adoptRef(new InspectorResourceAgent(instrumentingAgents, state, pageA
gent, client)); |
| 739 } |
| 740 |
| 741 InspectorResourceAgent::InspectorResourceAgent(InstrumentingAgents* instrumentin
gAgents, InspectorState* state, PassRefPtr<InspectorPageAgent> pageAgent, Inspec
torClient* client) |
| 742 : InspectorBaseAgent(instrumentingAgents, state) |
738 , m_pageAgent(pageAgent) | 743 , m_pageAgent(pageAgent) |
739 , m_client(client) | 744 , m_client(client) |
740 , m_frontend(0) | 745 , m_frontend(0) |
741 , m_resourcesData(adoptPtr(new NetworkResourcesData())) | 746 , m_resourcesData(adoptPtr(new NetworkResourcesData())) |
742 , m_loadingXHRSynchronously(false) | 747 , m_loadingXHRSynchronously(false) |
743 , m_isRecalculatingStyle(false) | 748 , m_isRecalculatingStyle(false) |
744 { | 749 { |
745 } | 750 } |
746 | 751 |
| 752 InspectorResourceFactory::InspectorResourceFactory(InstrumentingAgents* instrume
ntingAgents, InspectorCompositeState* compositeState, InspectorPageFactory* page
Factory, InspectorClient* client) |
| 753 : InspectorBaseFactory<InspectorResourceFactory, InspectorResourceAgent>("Re
source", instrumentingAgents, compositeState) |
| 754 { |
| 755 setAgent(InspectorResourceAgent::create(m_instrumentingAgents, m_state, page
Factory->agent(), client)); |
| 756 } |
| 757 |
747 } // namespace WebCore | 758 } // namespace WebCore |
748 | 759 |
OLD | NEW |