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 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
52 | 52 |
53 class InspectorWorkerAgent::WorkerFrontendChannel FINAL : public WorkerInspector
Proxy::PageInspector { | 53 class InspectorWorkerAgent::WorkerFrontendChannel FINAL : public WorkerInspector
Proxy::PageInspector { |
54 WTF_MAKE_FAST_ALLOCATED; | 54 WTF_MAKE_FAST_ALLOCATED; |
55 public: | 55 public: |
56 explicit WorkerFrontendChannel(InspectorFrontend::Worker* frontend, WorkerIn
spectorProxy* proxy) | 56 explicit WorkerFrontendChannel(InspectorFrontend::Worker* frontend, WorkerIn
spectorProxy* proxy) |
57 : m_frontend(frontend) | 57 : m_frontend(frontend) |
58 , m_proxy(proxy) | 58 , m_proxy(proxy) |
59 , m_id(s_nextId++) | 59 , m_id(s_nextId++) |
60 , m_connected(false) | 60 , m_connected(false) |
61 { | 61 { |
| 62 ASSERT(!proxy->pageInspector()); |
62 } | 63 } |
63 virtual ~WorkerFrontendChannel() | 64 virtual ~WorkerFrontendChannel() |
64 { | 65 { |
65 disconnectFromWorker(); | 66 disconnectFromWorker(); |
66 } | 67 } |
67 | 68 |
68 int id() const { return m_id; } | 69 int id() const { return m_id; } |
69 WorkerInspectorProxy* proxy() const { return m_proxy; } | 70 WorkerInspectorProxy* proxy() const { return m_proxy; } |
70 | 71 |
71 void connectToWorker() | 72 void connectToWorker() |
(...skipping 185 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
257 m_idToChannel.set(channel->id(), channel); | 258 m_idToChannel.set(channel->id(), channel); |
258 | 259 |
259 ASSERT(m_frontend); | 260 ASSERT(m_frontend); |
260 bool autoconnectToWorkers = m_state->getBoolean(WorkerAgentState::autoconnec
tToWorkers); | 261 bool autoconnectToWorkers = m_state->getBoolean(WorkerAgentState::autoconnec
tToWorkers); |
261 if (autoconnectToWorkers) | 262 if (autoconnectToWorkers) |
262 channel->connectToWorker(); | 263 channel->connectToWorker(); |
263 m_frontend->workerCreated(channel->id(), url, autoconnectToWorkers); | 264 m_frontend->workerCreated(channel->id(), url, autoconnectToWorkers); |
264 } | 265 } |
265 | 266 |
266 } // namespace blink | 267 } // namespace blink |
OLD | NEW |