| 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 26 matching lines...) Expand all Loading... |
| 37 #include "wtf/Vector.h" | 37 #include "wtf/Vector.h" |
| 38 #include <stdint.h> | 38 #include <stdint.h> |
| 39 | 39 |
| 40 namespace blink { | 40 namespace blink { |
| 41 | 41 |
| 42 class WebSocketChannelClient : public GarbageCollectedMixin { | 42 class WebSocketChannelClient : public GarbageCollectedMixin { |
| 43 public: | 43 public: |
| 44 virtual ~WebSocketChannelClient() { } | 44 virtual ~WebSocketChannelClient() { } |
| 45 virtual void didConnect(const String& subprotocol, const String& extensions)
{ } | 45 virtual void didConnect(const String& subprotocol, const String& extensions)
{ } |
| 46 virtual void didReceiveTextMessage(const String&) { } | 46 virtual void didReceiveTextMessage(const String&) { } |
| 47 virtual void didReceiveBinaryMessage(PassOwnPtr<Vector<char> >) { } | 47 virtual void didReceiveBinaryMessage(PassOwnPtr<Vector<char>>) { } |
| 48 virtual void didError() { } | 48 virtual void didError() { } |
| 49 virtual void didConsumeBufferedAmount(uint64_t consumed) { } | 49 virtual void didConsumeBufferedAmount(uint64_t consumed) { } |
| 50 virtual void didStartClosingHandshake() { } | 50 virtual void didStartClosingHandshake() { } |
| 51 enum ClosingHandshakeCompletionStatus { | 51 enum ClosingHandshakeCompletionStatus { |
| 52 ClosingHandshakeIncomplete, | 52 ClosingHandshakeIncomplete, |
| 53 ClosingHandshakeComplete | 53 ClosingHandshakeComplete |
| 54 }; | 54 }; |
| 55 virtual void didClose(ClosingHandshakeCompletionStatus, unsigned short /* co
de */, const String& /* reason */) { } | 55 virtual void didClose(ClosingHandshakeCompletionStatus, unsigned short /* co
de */, const String& /* reason */) { } |
| 56 virtual void trace(Visitor*) { } | 56 virtual void trace(Visitor*) { } |
| 57 | 57 |
| 58 protected: | 58 protected: |
| 59 WebSocketChannelClient() { } | 59 WebSocketChannelClient() { } |
| 60 }; | 60 }; |
| 61 | 61 |
| 62 } // namespace blink | 62 } // namespace blink |
| 63 | 63 |
| 64 #endif // WebSocketChannelClient_h | 64 #endif // WebSocketChannelClient_h |
| OLD | NEW |