| 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 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 50 class ExecutionContextTask; | 50 class ExecutionContextTask; |
| 51 class ThreadableWebSocketChannelSyncHelper; | 51 class ThreadableWebSocketChannelSyncHelper; |
| 52 class WorkerGlobalScope; | 52 class WorkerGlobalScope; |
| 53 class WorkerLoaderProxy; | 53 class WorkerLoaderProxy; |
| 54 | 54 |
| 55 class WorkerThreadableWebSocketChannel final : public WebSocketChannel { | 55 class WorkerThreadableWebSocketChannel final : public WebSocketChannel { |
| 56 WTF_MAKE_NONCOPYABLE(WorkerThreadableWebSocketChannel); | 56 WTF_MAKE_NONCOPYABLE(WorkerThreadableWebSocketChannel); |
| 57 public: | 57 public: |
| 58 static WebSocketChannel* create(WorkerGlobalScope& workerGlobalScope, WebSoc
ketChannelClient* client, const String& sourceURL, unsigned lineNumber) | 58 static WebSocketChannel* create(WorkerGlobalScope& workerGlobalScope, WebSoc
ketChannelClient* client, const String& sourceURL, unsigned lineNumber) |
| 59 { | 59 { |
| 60 return adoptRefCountedGarbageCollected(new WorkerThreadableWebSocketChan
nel(workerGlobalScope, client, sourceURL, lineNumber)); | 60 return new WorkerThreadableWebSocketChannel(workerGlobalScope, client, s
ourceURL, lineNumber); |
| 61 } | 61 } |
| 62 virtual ~WorkerThreadableWebSocketChannel(); | 62 virtual ~WorkerThreadableWebSocketChannel(); |
| 63 | 63 |
| 64 // WebSocketChannel functions. | 64 // WebSocketChannel functions. |
| 65 virtual bool connect(const KURL&, const String& protocol) override; | 65 virtual bool connect(const KURL&, const String& protocol) override; |
| 66 virtual void send(const String& message) override; | 66 virtual void send(const String& message) override; |
| 67 virtual void send(const ArrayBuffer&, unsigned byteOffset, unsigned byteLeng
th) override; | 67 virtual void send(const ArrayBuffer&, unsigned byteOffset, unsigned byteLeng
th) override; |
| 68 virtual void send(PassRefPtr<BlobDataHandle>) override; | 68 virtual void send(PassRefPtr<BlobDataHandle>) override; |
| 69 virtual void send(PassOwnPtr<Vector<char> >) override | 69 virtual void send(PassOwnPtr<Vector<char> >) override |
| 70 { | 70 { |
| (...skipping 90 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 161 WorkerThreadableWebSocketChannel(WorkerGlobalScope&, WebSocketChannelClient*
, const String& sourceURL, unsigned lineNumber); | 161 WorkerThreadableWebSocketChannel(WorkerGlobalScope&, WebSocketChannelClient*
, const String& sourceURL, unsigned lineNumber); |
| 162 | 162 |
| 163 Member<Bridge> m_bridge; | 163 Member<Bridge> m_bridge; |
| 164 String m_sourceURLAtConnection; | 164 String m_sourceURLAtConnection; |
| 165 unsigned m_lineNumberAtConnection; | 165 unsigned m_lineNumberAtConnection; |
| 166 }; | 166 }; |
| 167 | 167 |
| 168 } // namespace blink | 168 } // namespace blink |
| 169 | 169 |
| 170 #endif // WorkerThreadableWebSocketChannel_h | 170 #endif // WorkerThreadableWebSocketChannel_h |
| OLD | NEW |