| 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 27 matching lines...) Expand all Loading... |
| 38 | 38 |
| 39 InspectorAgent::InspectorAgent(const String& name) | 39 InspectorAgent::InspectorAgent(const String& name) |
| 40 : m_name(name) | 40 : m_name(name) |
| 41 { | 41 { |
| 42 } | 42 } |
| 43 | 43 |
| 44 InspectorAgent::~InspectorAgent() | 44 InspectorAgent::~InspectorAgent() |
| 45 { | 45 { |
| 46 } | 46 } |
| 47 | 47 |
| 48 void InspectorAgent::trace(Visitor* visitor) |
| 49 { |
| 50 visitor->trace(m_instrumentingAgents); |
| 51 } |
| 52 |
| 48 void InspectorAgent::appended(InstrumentingAgents* instrumentingAgents, Inspecto
rState* inspectorState) | 53 void InspectorAgent::appended(InstrumentingAgents* instrumentingAgents, Inspecto
rState* inspectorState) |
| 49 { | 54 { |
| 50 m_instrumentingAgents = instrumentingAgents; | 55 m_instrumentingAgents = instrumentingAgents; |
| 51 m_state = inspectorState; | 56 m_state = inspectorState; |
| 52 init(); | 57 init(); |
| 53 } | 58 } |
| 54 | 59 |
| 55 InspectorAgentRegistry::InspectorAgentRegistry(InstrumentingAgents* instrumentin
gAgents, InspectorCompositeState* inspectorState) | 60 InspectorAgentRegistry::InspectorAgentRegistry(InstrumentingAgents* instrumentin
gAgents, InspectorCompositeState* inspectorState) |
| 56 : m_instrumentingAgents(instrumentingAgents) | 61 : m_instrumentingAgents(instrumentingAgents) |
| 57 , m_inspectorState(inspectorState) | 62 , m_inspectorState(inspectorState) |
| 58 { | 63 { |
| 59 } | 64 } |
| 60 | 65 |
| 61 void InspectorAgentRegistry::append(PassOwnPtr<InspectorAgent> agent) | 66 void InspectorAgentRegistry::append(PassOwnPtrWillBeRawPtr<InspectorAgent> agent
) |
| 62 { | 67 { |
| 63 agent->appended(m_instrumentingAgents, m_inspectorState->createAgentState(ag
ent->name())); | 68 agent->appended(m_instrumentingAgents, m_inspectorState->createAgentState(ag
ent->name())); |
| 64 m_agents.append(agent); | 69 m_agents.append(agent); |
| 65 } | 70 } |
| 66 | 71 |
| 67 void InspectorAgentRegistry::setFrontend(InspectorFrontend* frontend) | 72 void InspectorAgentRegistry::setFrontend(InspectorFrontend* frontend) |
| 68 { | 73 { |
| 69 for (size_t i = 0; i < m_agents.size(); i++) | 74 for (size_t i = 0; i < m_agents.size(); i++) |
| 70 m_agents[i]->setFrontend(frontend); | 75 m_agents[i]->setFrontend(frontend); |
| 71 } | 76 } |
| (...skipping 21 matching lines...) Expand all Loading... |
| 93 for (size_t i = 0; i < m_agents.size(); i++) | 98 for (size_t i = 0; i < m_agents.size(); i++) |
| 94 m_agents[i]->discardAgent(); | 99 m_agents[i]->discardAgent(); |
| 95 } | 100 } |
| 96 | 101 |
| 97 void InspectorAgentRegistry::flushPendingFrontendMessages() | 102 void InspectorAgentRegistry::flushPendingFrontendMessages() |
| 98 { | 103 { |
| 99 for (size_t i = 0; i < m_agents.size(); i++) | 104 for (size_t i = 0; i < m_agents.size(); i++) |
| 100 m_agents[i]->flushPendingFrontendMessages(); | 105 m_agents[i]->flushPendingFrontendMessages(); |
| 101 } | 106 } |
| 102 | 107 |
| 108 void InspectorAgentRegistry::trace(Visitor* visitor) |
| 109 { |
| 110 visitor->trace(m_instrumentingAgents); |
| 111 #if ENABLE(OILPAN) |
| 112 visitor->trace(m_agents); |
| 113 #endif |
| 114 } |
| 115 |
| 103 } // namespace WebCore | 116 } // namespace WebCore |
| 104 | 117 |
| OLD | NEW |