Chromium Code Reviews| 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 // These two functions are devided in order to keep the WebSocket API: |
|
tyoshino (SeeGerritForStatus)
2014/06/09 09:24:26
keep -> follow?
and how about s/API/API spec/
yhirano
2014/06/09 11:59:51
Done.
| |
| 48 virtual void didStartClosingHandshake() { } | 48 // The amount should be exposed immediately and the amount should |
| 49 enum ClosingHandshakeCompletionStatus { | 49 // be exposed behind. |
|
tyoshino (SeeGerritForStatus)
2014/06/09 09:24:26
couldn't get the meaning of this.
yhirano
2014/06/09 11:59:51
Done.
| |
| 50 ClosingHandshakeIncomplete, | 50 virtual void didIncreaseBufferedAmount(unsigned long amountOfIncrease) { } |
| 51 ClosingHandshakeComplete | 51 virtual void didDecreaseBufferedAmount(unsigned long amountOfDecrease) { } |
| 52 }; | 52 virtual void didStartClosingHandshake() { } |
| 53 virtual void didClose(unsigned long /* unhandledBufferedAmount */, Closi ngHandshakeCompletionStatus, unsigned short /* code */, const String& /* reason */) { } | 53 enum ClosingHandshakeCompletionStatus { |
| 54 ClosingHandshakeIncomplete, | |
| 55 ClosingHandshakeComplete | |
| 56 }; | |
| 57 virtual void didClose(unsigned long /* unhandledBufferedAmount */, ClosingHa ndshakeCompletionStatus, unsigned short /* code */, const String& /* reason */) { } | |
| 54 | 58 |
| 55 protected: | 59 protected: |
| 56 WebSocketChannelClient() { } | 60 WebSocketChannelClient() { } |
| 57 }; | 61 }; |
| 58 | 62 |
| 59 } // namespace WebCore | 63 } // namespace WebCore |
| 60 | 64 |
| 61 #endif // WebSocketChannelClient_h | 65 #endif // WebSocketChannelClient_h |
| OLD | NEW |