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 87 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
98 | 98 |
99 InspectorFrontend* m_frontend; | 99 InspectorFrontend* m_frontend; |
100 WorkerGlobalScopeProxy* m_proxy; | 100 WorkerGlobalScopeProxy* m_proxy; |
101 int m_id; | 101 int m_id; |
102 bool m_connected; | 102 bool m_connected; |
103 static int s_nextId; | 103 static int s_nextId; |
104 }; | 104 }; |
105 | 105 |
106 int InspectorWorkerAgent::WorkerFrontendChannel::s_nextId = 1; | 106 int InspectorWorkerAgent::WorkerFrontendChannel::s_nextId = 1; |
107 | 107 |
108 PassOwnPtr<InspectorWorkerAgent> InspectorWorkerAgent::create() | 108 PassOwnPtrWillBeRawPtr<InspectorWorkerAgent> InspectorWorkerAgent::create() |
109 { | 109 { |
110 return adoptPtr(new InspectorWorkerAgent()); | 110 return adoptPtrWillBeNoop(new InspectorWorkerAgent()); |
111 } | 111 } |
112 | 112 |
113 InspectorWorkerAgent::InspectorWorkerAgent() | 113 InspectorWorkerAgent::InspectorWorkerAgent() |
114 : InspectorBaseAgent<InspectorWorkerAgent>("Worker") | 114 : InspectorBaseAgent<InspectorWorkerAgent>("Worker") |
115 , m_inspectorFrontend(0) | 115 , m_inspectorFrontend(0) |
116 { | 116 { |
117 } | 117 } |
118 | 118 |
119 InspectorWorkerAgent::~InspectorWorkerAgent() | 119 InspectorWorkerAgent::~InspectorWorkerAgent() |
120 { | 120 { |
| 121 #if !ENABLE(OILPAN) |
121 m_instrumentingAgents->setInspectorWorkerAgent(0); | 122 m_instrumentingAgents->setInspectorWorkerAgent(0); |
| 123 #endif |
122 } | 124 } |
123 | 125 |
124 void InspectorWorkerAgent::init() | 126 void InspectorWorkerAgent::init() |
125 { | 127 { |
126 m_instrumentingAgents->setInspectorWorkerAgent(this); | 128 m_instrumentingAgents->setInspectorWorkerAgent(this); |
127 } | 129 } |
128 | 130 |
129 void InspectorWorkerAgent::setFrontend(InspectorFrontend* frontend) | 131 void InspectorWorkerAgent::setFrontend(InspectorFrontend* frontend) |
130 { | 132 { |
131 m_inspectorFrontend = frontend; | 133 m_inspectorFrontend = frontend; |
(...skipping 111 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
243 m_idToChannel.set(channel->id(), channel); | 245 m_idToChannel.set(channel->id(), channel); |
244 | 246 |
245 ASSERT(m_inspectorFrontend); | 247 ASSERT(m_inspectorFrontend); |
246 bool autoconnectToWorkers = m_state->getBoolean(WorkerAgentState::autoconnec
tToWorkers); | 248 bool autoconnectToWorkers = m_state->getBoolean(WorkerAgentState::autoconnec
tToWorkers); |
247 if (autoconnectToWorkers) | 249 if (autoconnectToWorkers) |
248 channel->connectToWorkerGlobalScope(); | 250 channel->connectToWorkerGlobalScope(); |
249 m_inspectorFrontend->worker()->workerCreated(channel->id(), url, autoconnect
ToWorkers); | 251 m_inspectorFrontend->worker()->workerCreated(channel->id(), url, autoconnect
ToWorkers); |
250 } | 252 } |
251 | 253 |
252 } // namespace blink | 254 } // namespace blink |
OLD | NEW |