| 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 53 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 64 } | 64 } |
| 65 ~WorkerWebSocketChannel() override; | 65 ~WorkerWebSocketChannel() override; |
| 66 | 66 |
| 67 // WebSocketChannel functions. | 67 // WebSocketChannel functions. |
| 68 bool connect(const KURL&, const String& protocol) override; | 68 bool connect(const KURL&, const String& protocol) override; |
| 69 void send(const CString&) override; | 69 void send(const CString&) override; |
| 70 void send(const DOMArrayBuffer&, unsigned byteOffset, unsigned byteLength) o
verride; | 70 void send(const DOMArrayBuffer&, unsigned byteOffset, unsigned byteLength) o
verride; |
| 71 void send(PassRefPtr<BlobDataHandle>) override; | 71 void send(PassRefPtr<BlobDataHandle>) override; |
| 72 void sendTextAsCharVector(std::unique_ptr<Vector<char>>) override | 72 void sendTextAsCharVector(std::unique_ptr<Vector<char>>) override |
| 73 { | 73 { |
| 74 ASSERT_NOT_REACHED(); | 74 NOTREACHED(); |
| 75 } | 75 } |
| 76 void sendBinaryAsCharVector(std::unique_ptr<Vector<char>>) override | 76 void sendBinaryAsCharVector(std::unique_ptr<Vector<char>>) override |
| 77 { | 77 { |
| 78 ASSERT_NOT_REACHED(); | 78 NOTREACHED(); |
| 79 } | 79 } |
| 80 void close(int code, const String& reason) override; | 80 void close(int code, const String& reason) override; |
| 81 void fail(const String& reason, MessageLevel, std::unique_ptr<SourceLocation
>) override; | 81 void fail(const String& reason, MessageLevel, std::unique_ptr<SourceLocation
>) override; |
| 82 void disconnect() override; // Will suppress didClose(). | 82 void disconnect() override; // Will suppress didClose(). |
| 83 | 83 |
| 84 DECLARE_VIRTUAL_TRACE(); | 84 DECLARE_VIRTUAL_TRACE(); |
| 85 | 85 |
| 86 class Bridge; | 86 class Bridge; |
| 87 // Allocated and used in the main thread. | 87 // Allocated and used in the main thread. |
| 88 class Peer final : public GarbageCollectedFinalized<Peer>, public WebSocketC
hannelClient, public WorkerThreadLifecycleObserver { | 88 class Peer final : public GarbageCollectedFinalized<Peer>, public WebSocketC
hannelClient, public WorkerThreadLifecycleObserver { |
| (...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 161 private: | 161 private: |
| 162 WorkerWebSocketChannel(WorkerGlobalScope&, WebSocketChannelClient*, std::uni
que_ptr<SourceLocation>); | 162 WorkerWebSocketChannel(WorkerGlobalScope&, WebSocketChannelClient*, std::uni
que_ptr<SourceLocation>); |
| 163 | 163 |
| 164 Member<Bridge> m_bridge; | 164 Member<Bridge> m_bridge; |
| 165 std::unique_ptr<SourceLocation> m_locationAtConnection; | 165 std::unique_ptr<SourceLocation> m_locationAtConnection; |
| 166 }; | 166 }; |
| 167 | 167 |
| 168 } // namespace blink | 168 } // namespace blink |
| 169 | 169 |
| 170 #endif // WorkerWebSocketChannel_h | 170 #endif // WorkerWebSocketChannel_h |
| OLD | NEW |