| 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 19 matching lines...) Expand all Loading... |
| 30 | 30 |
| 31 #ifndef WebSocketChannelClient_h | 31 #ifndef WebSocketChannelClient_h |
| 32 #define WebSocketChannelClient_h | 32 #define WebSocketChannelClient_h |
| 33 | 33 |
| 34 #include "wtf/Forward.h" | 34 #include "wtf/Forward.h" |
| 35 #include "wtf/PassOwnPtr.h" | 35 #include "wtf/PassOwnPtr.h" |
| 36 #include "wtf/Vector.h" | 36 #include "wtf/Vector.h" |
| 37 | 37 |
| 38 namespace WebCore { | 38 namespace WebCore { |
| 39 | 39 |
| 40 class WebSocketChannelClient { | 40 class WebSocketChannelClient { |
| 41 public: | 41 public: |
| 42 virtual ~WebSocketChannelClient() { } | 42 virtual ~WebSocketChannelClient() { } |
| 43 virtual void didConnect() { } | 43 virtual void didConnect() { } |
| 44 virtual void didReceiveMessage(const String&) { } | 44 virtual void didReceiveMessage(const String&) { } |
| 45 virtual void didReceiveBinaryData(PassOwnPtr<Vector<char> >) { } | 45 virtual void didReceiveBinaryData(PassOwnPtr<Vector<char> >) { } |
| 46 virtual void didReceiveMessageError() { } | 46 virtual void didReceiveMessageError() { } |
| 47 virtual void didUpdateBufferedAmount(unsigned long /* bufferedAmount */)
{ } | 47 virtual void didConsumeBufferedAmount(unsigned long consumed) { } |
| 48 virtual void didStartClosingHandshake() { } | 48 virtual void didStartClosingHandshake() { } |
| 49 enum ClosingHandshakeCompletionStatus { | 49 enum ClosingHandshakeCompletionStatus { |
| 50 ClosingHandshakeIncomplete, | 50 ClosingHandshakeIncomplete, |
| 51 ClosingHandshakeComplete | 51 ClosingHandshakeComplete |
| 52 }; | 52 }; |
| 53 virtual void didClose(unsigned long /* unhandledBufferedAmount */, Closi
ngHandshakeCompletionStatus, unsigned short /* code */, const String& /* reason
*/) { } | 53 virtual void didClose(ClosingHandshakeCompletionStatus, unsigned short /* co
de */, const String& /* reason */) { } |
| 54 | 54 |
| 55 protected: | 55 protected: |
| 56 WebSocketChannelClient() { } | 56 WebSocketChannelClient() { } |
| 57 }; | 57 }; |
| 58 | 58 |
| 59 } // namespace WebCore | 59 } // namespace WebCore |
| 60 | 60 |
| 61 #endif // WebSocketChannelClient_h | 61 #endif // WebSocketChannelClient_h |
| OLD | NEW |