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 721 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
732 | 732 |
733 if (m_state->getBoolean(ResourceAgentState::cacheDisabled)) | 733 if (m_state->getBoolean(ResourceAgentState::cacheDisabled)) |
734 memoryCache()->evictResources(); | 734 memoryCache()->evictResources(); |
735 | 735 |
736 m_resourcesData->clear(m_pageAgent->loaderId(loader)); | 736 m_resourcesData->clear(m_pageAgent->loaderId(loader)); |
737 } | 737 } |
738 | 738 |
739 void InspectorResourceAgent::reportMemoryUsage(MemoryObjectInfo* memoryObjectInf
o) const | 739 void InspectorResourceAgent::reportMemoryUsage(MemoryObjectInfo* memoryObjectInf
o) const |
740 { | 740 { |
741 MemoryClassInfo info(memoryObjectInfo, this, WebCoreMemoryTypes::InspectorRe
sourceAgent); | 741 MemoryClassInfo info(memoryObjectInfo, this, WebCoreMemoryTypes::InspectorRe
sourceAgent); |
742 InspectorBaseAgent<InspectorResourceAgent>::reportMemoryUsage(memoryObjectIn
fo); | 742 InspectorBaseAgent::reportMemoryUsage(memoryObjectInfo); |
743 info.addWeakPointer(m_pageAgent); | 743 info.addWeakPointer(m_pageAgent.get()); |
744 info.addWeakPointer(m_client); | 744 info.addWeakPointer(m_client); |
745 info.addWeakPointer(m_frontend); | 745 info.addWeakPointer(m_frontend); |
746 info.addMember(m_userAgentOverride, "userAgentOverride"); | 746 info.addMember(m_userAgentOverride, "userAgentOverride"); |
747 info.addMember(m_resourcesData, "resourcesData"); | 747 info.addMember(m_resourcesData, "resourcesData"); |
748 info.addMember(m_pendingXHRReplayData, "pendingXHRReplayData"); | 748 info.addMember(m_pendingXHRReplayData, "pendingXHRReplayData"); |
749 info.addMember(m_styleRecalculationInitiator, "styleRecalculationInitiator")
; | 749 info.addMember(m_styleRecalculationInitiator, "styleRecalculationInitiator")
; |
750 } | 750 } |
751 | 751 |
752 InspectorResourceAgent::InspectorResourceAgent(InstrumentingAgents* instrumentin
gAgents, InspectorPageAgent* pageAgent, InspectorClient* client, InspectorCompos
iteState* state) | 752 PassRefPtr<InspectorResourceAgent> InspectorResourceAgent::create(InstrumentingA
gents* instrumentingAgents, InspectorState* state, PassRefPtr<InspectorPageAgent
> pageAgent, InspectorClient* client) |
753 : InspectorBaseAgent<InspectorResourceAgent>("Network", instrumentingAgents,
state) | 753 { |
| 754 return adoptRef(new InspectorResourceAgent(instrumentingAgents, state, pageA
gent, client)); |
| 755 } |
| 756 |
| 757 InspectorResourceAgent::InspectorResourceAgent(InstrumentingAgents* instrumentin
gAgents, InspectorState* state, PassRefPtr<InspectorPageAgent> pageAgent, Inspec
torClient* client) |
| 758 : InspectorBaseAgent(instrumentingAgents, state) |
754 , m_pageAgent(pageAgent) | 759 , m_pageAgent(pageAgent) |
755 , m_client(client) | 760 , m_client(client) |
756 , m_frontend(0) | 761 , m_frontend(0) |
757 , m_resourcesData(adoptPtr(new NetworkResourcesData())) | 762 , m_resourcesData(adoptPtr(new NetworkResourcesData())) |
758 , m_loadingXHRSynchronously(false) | 763 , m_loadingXHRSynchronously(false) |
759 , m_isRecalculatingStyle(false) | 764 , m_isRecalculatingStyle(false) |
760 { | 765 { |
761 } | 766 } |
762 | 767 |
| 768 InspectorResourceController::InspectorResourceController(InstrumentingAgents* in
strumentingAgents, InspectorCompositeState* compositeState, InspectorPageControl
ler* pageController, InspectorClient* client) |
| 769 : InspectorBaseController<InspectorResourceController, InspectorResourceAgen
t>("Resource", instrumentingAgents, compositeState) |
| 770 { |
| 771 setAgent(InspectorResourceAgent::create(m_instrumentingAgents, m_state, page
Controller->getAgent(), client)); |
| 772 } |
| 773 |
763 } // namespace WebCore | 774 } // namespace WebCore |
764 | 775 |
OLD | NEW |