| 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 111 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 122 void didReceiveTextMessage(const String& payload) override; | 122 void didReceiveTextMessage(const String& payload) override; |
| 123 void didReceiveBinaryMessage(std::unique_ptr<Vector<char>>) override; | 123 void didReceiveBinaryMessage(std::unique_ptr<Vector<char>>) override; |
| 124 void didConsumeBufferedAmount(uint64_t) override; | 124 void didConsumeBufferedAmount(uint64_t) override; |
| 125 void didStartClosingHandshake() override; | 125 void didStartClosingHandshake() override; |
| 126 void didClose(ClosingHandshakeCompletionStatus, | 126 void didClose(ClosingHandshakeCompletionStatus, |
| 127 unsigned short code, | 127 unsigned short code, |
| 128 const String& reason) override; | 128 const String& reason) override; |
| 129 void didError() override; | 129 void didError() override; |
| 130 | 130 |
| 131 // WorkerThreadLifecycleObserver function. | 131 // WorkerThreadLifecycleObserver function. |
| 132 void contextDestroyed() override; | 132 void contextDestroyed(WorkerThreadLifecycleContext*) override; |
| 133 | 133 |
| 134 private: | 134 private: |
| 135 CrossThreadWeakPersistent<Bridge> m_bridge; | 135 CrossThreadWeakPersistent<Bridge> m_bridge; |
| 136 RefPtr<WorkerLoaderProxy> m_loaderProxy; | 136 RefPtr<WorkerLoaderProxy> m_loaderProxy; |
| 137 Member<WebSocketChannel> m_mainWebSocketChannel; | 137 Member<WebSocketChannel> m_mainWebSocketChannel; |
| 138 }; | 138 }; |
| 139 | 139 |
| 140 // Bridge for Peer. Running on the worker thread. | 140 // Bridge for Peer. Running on the worker thread. |
| 141 class Bridge final : public GarbageCollectedFinalized<Bridge> { | 141 class Bridge final : public GarbageCollectedFinalized<Bridge> { |
| 142 WTF_MAKE_NONCOPYABLE(Bridge); | 142 WTF_MAKE_NONCOPYABLE(Bridge); |
| (...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 185 WebSocketChannelClient*, | 185 WebSocketChannelClient*, |
| 186 std::unique_ptr<SourceLocation>); | 186 std::unique_ptr<SourceLocation>); |
| 187 | 187 |
| 188 Member<Bridge> m_bridge; | 188 Member<Bridge> m_bridge; |
| 189 std::unique_ptr<SourceLocation> m_locationAtConnection; | 189 std::unique_ptr<SourceLocation> m_locationAtConnection; |
| 190 }; | 190 }; |
| 191 | 191 |
| 192 } // namespace blink | 192 } // namespace blink |
| 193 | 193 |
| 194 #endif // WorkerWebSocketChannel_h | 194 #endif // WorkerWebSocketChannel_h |
| OLD | NEW |