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 86 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
97 | 97 |
98 InspectorFrontend* m_frontend; | 98 InspectorFrontend* m_frontend; |
99 WorkerContextProxy* m_proxy; | 99 WorkerContextProxy* m_proxy; |
100 int m_id; | 100 int m_id; |
101 bool m_connected; | 101 bool m_connected; |
102 static int s_nextId; | 102 static int s_nextId; |
103 }; | 103 }; |
104 | 104 |
105 int InspectorWorkerAgent::WorkerFrontendChannel::s_nextId = 1; | 105 int InspectorWorkerAgent::WorkerFrontendChannel::s_nextId = 1; |
106 | 106 |
107 PassOwnPtr<InspectorWorkerAgent> InspectorWorkerAgent::create(InstrumentingAgent
s* instrumentingAgents, InspectorCompositeState* inspectorState) | 107 PassRefPtr<InspectorWorkerAgent> InspectorWorkerAgent::create(InstrumentingAgent
s* instrumentingAgents, InspectorState* inspectorState) |
108 { | 108 { |
109 return adoptPtr(new InspectorWorkerAgent(instrumentingAgents, inspectorState
)); | 109 return adoptRef(new InspectorWorkerAgent(instrumentingAgents, inspectorState
)); |
110 } | 110 } |
111 | 111 |
112 InspectorWorkerAgent::InspectorWorkerAgent(InstrumentingAgents* instrumentingAge
nts, InspectorCompositeState* inspectorState) | 112 InspectorWorkerAgent::InspectorWorkerAgent(InstrumentingAgents* instrumentingAge
nts, InspectorState* inspectorState) |
113 : InspectorBaseAgent<InspectorWorkerAgent>("Worker", instrumentingAgents, in
spectorState) | 113 : InspectorBaseAgent(instrumentingAgents, inspectorState) |
114 , m_inspectorFrontend(0) | 114 , m_inspectorFrontend(0) |
115 { | 115 { |
116 m_instrumentingAgents->setInspectorWorkerAgent(this); | 116 m_instrumentingAgents->setInspectorWorkerAgent(this); |
117 } | 117 } |
118 | 118 |
119 InspectorWorkerAgent::~InspectorWorkerAgent() | 119 InspectorWorkerAgent::~InspectorWorkerAgent() |
120 { | 120 { |
121 m_instrumentingAgents->setInspectorWorkerAgent(0); | 121 m_instrumentingAgents->setInspectorWorkerAgent(0); |
122 } | 122 } |
123 | 123 |
(...skipping 114 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
238 m_idToChannel.set(channel->id(), channel); | 238 m_idToChannel.set(channel->id(), channel); |
239 | 239 |
240 ASSERT(m_inspectorFrontend); | 240 ASSERT(m_inspectorFrontend); |
241 bool autoconnectToWorkers = m_state->getBoolean(WorkerAgentState::autoconnec
tToWorkers); | 241 bool autoconnectToWorkers = m_state->getBoolean(WorkerAgentState::autoconnec
tToWorkers); |
242 if (autoconnectToWorkers) | 242 if (autoconnectToWorkers) |
243 channel->connectToWorkerContext(); | 243 channel->connectToWorkerContext(); |
244 m_inspectorFrontend->worker()->workerCreated(channel->id(), url, autoconnect
ToWorkers); | 244 m_inspectorFrontend->worker()->workerCreated(channel->id(), url, autoconnect
ToWorkers); |
245 } | 245 } |
246 | 246 |
247 } // namespace WebCore | 247 } // namespace WebCore |
OLD | NEW |