| 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 46 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 57 class ExecutionContext; | 57 class ExecutionContext; |
| 58 class ThreadableWebSocketChannelClientWrapper; | 58 class ThreadableWebSocketChannelClientWrapper; |
| 59 class ThreadableWebSocketChannelSyncHelper; | 59 class ThreadableWebSocketChannelSyncHelper; |
| 60 class WorkerGlobalScope; | 60 class WorkerGlobalScope; |
| 61 class WorkerLoaderProxy; | 61 class WorkerLoaderProxy; |
| 62 class WorkerRunLoop; | 62 class WorkerRunLoop; |
| 63 | 63 |
| 64 class WorkerThreadableWebSocketChannel FINAL : public RefCounted<WorkerThreadabl
eWebSocketChannel>, public WebSocketChannel { | 64 class WorkerThreadableWebSocketChannel FINAL : public RefCounted<WorkerThreadabl
eWebSocketChannel>, public WebSocketChannel { |
| 65 WTF_MAKE_FAST_ALLOCATED; | 65 WTF_MAKE_FAST_ALLOCATED; |
| 66 public: | 66 public: |
| 67 static PassRefPtr<WebSocketChannel> create(WorkerGlobalScope* workerGlobalSc
ope, WebSocketChannelClient* client, const String& sourceURL, unsigned lineNumbe
r) | 67 static PassRefPtr<WebSocketChannel> create(WorkerGlobalScope& workerGlobalSc
ope, WebSocketChannelClient* client, const String& sourceURL, unsigned lineNumbe
r) |
| 68 { | 68 { |
| 69 return adoptRef(new WorkerThreadableWebSocketChannel(workerGlobalScope,
client, sourceURL, lineNumber)); | 69 return adoptRef(new WorkerThreadableWebSocketChannel(workerGlobalScope,
client, sourceURL, lineNumber)); |
| 70 } | 70 } |
| 71 virtual ~WorkerThreadableWebSocketChannel(); | 71 virtual ~WorkerThreadableWebSocketChannel(); |
| 72 | 72 |
| 73 // WebSocketChannel functions. | 73 // WebSocketChannel functions. |
| 74 virtual void connect(const KURL&, const String& protocol) OVERRIDE; | 74 virtual void connect(const KURL&, const String& protocol) OVERRIDE; |
| 75 virtual String subprotocol() OVERRIDE; | 75 virtual String subprotocol() OVERRIDE; |
| 76 virtual String extensions() OVERRIDE; | 76 virtual String extensions() OVERRIDE; |
| 77 virtual WebSocketChannel::SendResult send(const String& message) OVERRIDE; | 77 virtual WebSocketChannel::SendResult send(const String& message) OVERRIDE; |
| (...skipping 96 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 174 | 174 |
| 175 void terminatePeer(); | 175 void terminatePeer(); |
| 176 | 176 |
| 177 RefPtr<ThreadableWebSocketChannelClientWrapper> m_workerClientWrapper; | 177 RefPtr<ThreadableWebSocketChannelClientWrapper> m_workerClientWrapper; |
| 178 RefPtrWillBePersistent<WorkerGlobalScope> m_workerGlobalScope; | 178 RefPtrWillBePersistent<WorkerGlobalScope> m_workerGlobalScope; |
| 179 WorkerLoaderProxy& m_loaderProxy; | 179 WorkerLoaderProxy& m_loaderProxy; |
| 180 ThreadableWebSocketChannelSyncHelper* m_syncHelper; | 180 ThreadableWebSocketChannelSyncHelper* m_syncHelper; |
| 181 WeakPtr<Peer> m_peer; | 181 WeakPtr<Peer> m_peer; |
| 182 }; | 182 }; |
| 183 | 183 |
| 184 WorkerThreadableWebSocketChannel(WorkerGlobalScope*, WebSocketChannelClient*
, const String& sourceURL, unsigned lineNumber); | 184 WorkerThreadableWebSocketChannel(WorkerGlobalScope&, WebSocketChannelClient*
, const String& sourceURL, unsigned lineNumber); |
| 185 | 185 |
| 186 RefPtrWillBePersistent<WorkerGlobalScope> m_workerGlobalScope; | 186 RefPtrWillBePersistent<WorkerGlobalScope> m_workerGlobalScope; |
| 187 RefPtr<ThreadableWebSocketChannelClientWrapper> m_workerClientWrapper; | 187 RefPtr<ThreadableWebSocketChannelClientWrapper> m_workerClientWrapper; |
| 188 RefPtr<Bridge> m_bridge; | 188 RefPtr<Bridge> m_bridge; |
| 189 String m_sourceURLAtConnection; | 189 String m_sourceURLAtConnection; |
| 190 unsigned m_lineNumberAtConnection; | 190 unsigned m_lineNumberAtConnection; |
| 191 }; | 191 }; |
| 192 | 192 |
| 193 } // namespace WebCore | 193 } // namespace WebCore |
| 194 | 194 |
| 195 #endif // WorkerThreadableWebSocketChannel_h | 195 #endif // WorkerThreadableWebSocketChannel_h |
| OLD | NEW |