OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #ifndef WebSocketChannelClientProxy_h | 5 #ifndef WebSocketChannelClientProxy_h |
6 #define WebSocketChannelClientProxy_h | 6 #define WebSocketChannelClientProxy_h |
7 | 7 |
8 #include "modules/websockets/WebSocketChannelClient.h" | 8 #include "modules/websockets/WebSocketChannelClient.h" |
9 #include "platform/heap/Handle.h" | 9 #include "platform/heap/Handle.h" |
10 #include "web/WebSocketImpl.h" | 10 #include "web/WebSocketImpl.h" |
(...skipping 25 matching lines...) Expand all Loading... |
36 m_impl->didReceiveTextMessage(payload); | 36 m_impl->didReceiveTextMessage(payload); |
37 } | 37 } |
38 virtual void didReceiveBinaryMessage(PassOwnPtr<Vector<char> > payload) over
ride | 38 virtual void didReceiveBinaryMessage(PassOwnPtr<Vector<char> > payload) over
ride |
39 { | 39 { |
40 m_impl->didReceiveBinaryMessage(payload); | 40 m_impl->didReceiveBinaryMessage(payload); |
41 } | 41 } |
42 virtual void didError() override | 42 virtual void didError() override |
43 { | 43 { |
44 m_impl->didError(); | 44 m_impl->didError(); |
45 } | 45 } |
46 virtual void didConsumeBufferedAmount(unsigned long consumed) override | 46 virtual void didConsumeBufferedAmount(unsigned consumed) override |
47 { | 47 { |
48 m_impl->didConsumeBufferedAmount(consumed); | 48 m_impl->didConsumeBufferedAmount(consumed); |
49 } | 49 } |
50 virtual void didStartClosingHandshake() override | 50 virtual void didStartClosingHandshake() override |
51 { | 51 { |
52 m_impl->didStartClosingHandshake(); | 52 m_impl->didStartClosingHandshake(); |
53 } | 53 } |
54 virtual void didClose(ClosingHandshakeCompletionStatus status, unsigned shor
t code, const String& reason) override | 54 virtual void didClose(ClosingHandshakeCompletionStatus status, unsigned shor
t code, const String& reason) override |
55 { | 55 { |
56 WebSocketImpl* impl = m_impl; | 56 WebSocketImpl* impl = m_impl; |
57 m_impl = nullptr; | 57 m_impl = nullptr; |
58 impl->didClose(status, code, reason); | 58 impl->didClose(status, code, reason); |
59 } | 59 } |
60 | 60 |
61 private: | 61 private: |
62 explicit WebSocketChannelClientProxy(WebSocketImpl* impl) | 62 explicit WebSocketChannelClientProxy(WebSocketImpl* impl) |
63 : m_impl(impl) | 63 : m_impl(impl) |
64 { | 64 { |
65 } | 65 } |
66 | 66 |
67 WebSocketImpl* m_impl; | 67 WebSocketImpl* m_impl; |
68 }; | 68 }; |
69 | 69 |
70 } // namespace blink | 70 } // namespace blink |
71 | 71 |
72 #endif // WebSocketChannelClientProxy_h | 72 #endif // WebSocketChannelClientProxy_h |
OLD | NEW |