| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2011, 2012 Google Inc. All rights reserved. | 2 * Copyright (C) 2011, 2012 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 25 matching lines...) Expand all Loading... |
| 36 #include "core/dom/CrossThreadTask.h" | 36 #include "core/dom/CrossThreadTask.h" |
| 37 #include "core/dom/Document.h" | 37 #include "core/dom/Document.h" |
| 38 #include "core/dom/ExecutionContext.h" | 38 #include "core/dom/ExecutionContext.h" |
| 39 #include "core/dom/ExecutionContextTask.h" | 39 #include "core/dom/ExecutionContextTask.h" |
| 40 #include "core/fileapi/Blob.h" | 40 #include "core/fileapi/Blob.h" |
| 41 #include "core/inspector/ScriptCallFrame.h" | 41 #include "core/inspector/ScriptCallFrame.h" |
| 42 #include "core/inspector/ScriptCallStack.h" | 42 #include "core/inspector/ScriptCallStack.h" |
| 43 #include "core/workers/WorkerGlobalScope.h" | 43 #include "core/workers/WorkerGlobalScope.h" |
| 44 #include "core/workers/WorkerLoaderProxy.h" | 44 #include "core/workers/WorkerLoaderProxy.h" |
| 45 #include "core/workers/WorkerThread.h" | 45 #include "core/workers/WorkerThread.h" |
| 46 #include "modules/websockets/NewWebSocketChannelImpl.h" | 46 #include "modules/websockets/DocumentWebSocketChannel.h" |
| 47 #include "public/platform/Platform.h" | 47 #include "public/platform/Platform.h" |
| 48 #include "public/platform/WebWaitableEvent.h" | 48 #include "public/platform/WebWaitableEvent.h" |
| 49 #include "wtf/ArrayBuffer.h" | 49 #include "wtf/ArrayBuffer.h" |
| 50 #include "wtf/Assertions.h" | 50 #include "wtf/Assertions.h" |
| 51 #include "wtf/Functional.h" | 51 #include "wtf/Functional.h" |
| 52 #include "wtf/MainThread.h" | 52 #include "wtf/MainThread.h" |
| 53 #include "wtf/text/WTFString.h" | 53 #include "wtf/text/WTFString.h" |
| 54 | 54 |
| 55 namespace blink { | 55 namespace blink { |
| 56 | 56 |
| (...skipping 137 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 194 | 194 |
| 195 Peer::~Peer() | 195 Peer::~Peer() |
| 196 { | 196 { |
| 197 ASSERT(!isMainThread()); | 197 ASSERT(!isMainThread()); |
| 198 } | 198 } |
| 199 | 199 |
| 200 void Peer::initializeInternal(ExecutionContext* context, const String& sourceURL
, unsigned lineNumber) | 200 void Peer::initializeInternal(ExecutionContext* context, const String& sourceURL
, unsigned lineNumber) |
| 201 { | 201 { |
| 202 ASSERT(isMainThread()); | 202 ASSERT(isMainThread()); |
| 203 Document* document = toDocument(context); | 203 Document* document = toDocument(context); |
| 204 m_mainWebSocketChannel = NewWebSocketChannelImpl::create(document, this, sou
rceURL, lineNumber); | 204 m_mainWebSocketChannel = DocumentWebSocketChannel::create(document, this, so
urceURL, lineNumber); |
| 205 m_syncHelper->signalWorkerThread(); | 205 m_syncHelper->signalWorkerThread(); |
| 206 } | 206 } |
| 207 | 207 |
| 208 void Peer::connect(const KURL& url, const String& protocol) | 208 void Peer::connect(const KURL& url, const String& protocol) |
| 209 { | 209 { |
| 210 ASSERT(isMainThread()); | 210 ASSERT(isMainThread()); |
| 211 ASSERT(m_syncHelper); | 211 ASSERT(m_syncHelper); |
| 212 if (!m_mainWebSocketChannel) { | 212 if (!m_mainWebSocketChannel) { |
| 213 m_syncHelper->setConnectRequestResult(false); | 213 m_syncHelper->setConnectRequestResult(false); |
| 214 } else { | 214 } else { |
| (...skipping 258 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 473 | 473 |
| 474 void Bridge::trace(Visitor* visitor) | 474 void Bridge::trace(Visitor* visitor) |
| 475 { | 475 { |
| 476 visitor->trace(m_client); | 476 visitor->trace(m_client); |
| 477 visitor->trace(m_workerGlobalScope); | 477 visitor->trace(m_workerGlobalScope); |
| 478 visitor->trace(m_syncHelper); | 478 visitor->trace(m_syncHelper); |
| 479 visitor->trace(m_peer); | 479 visitor->trace(m_peer); |
| 480 } | 480 } |
| 481 | 481 |
| 482 } // namespace blink | 482 } // namespace blink |
| OLD | NEW |