| Index: public/platform/WebSocketHandleClient.h
|
| diff --git a/public/platform/WebSocketStreamHandleClient.h b/public/platform/WebSocketHandleClient.h
|
| similarity index 66%
|
| copy from public/platform/WebSocketStreamHandleClient.h
|
| copy to public/platform/WebSocketHandleClient.h
|
| index 4f392411056f2160f1691d48470a2f2807c8c899..f06606264365ada1d1d2d65cbdd25cc5b81cb26d 100644
|
| --- a/public/platform/WebSocketStreamHandleClient.h
|
| +++ b/public/platform/WebSocketHandleClient.h
|
| @@ -1,5 +1,5 @@
|
| /*
|
| - * Copyright (C) 2009 Google Inc. All rights reserved.
|
| + * Copyright (C) 2013 Google Inc. All rights reserved.
|
| *
|
| * Redistribution and use in source and binary forms, with or without
|
| * modification, are permitted provided that the following conditions are
|
| @@ -28,37 +28,33 @@
|
| * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
| */
|
|
|
| -#ifndef WebSocketStreamHandleClient_h
|
| -#define WebSocketStreamHandleClient_h
|
| +#ifndef WebSocketHandleClient_h
|
| +#define WebSocketHandleClient_h
|
|
|
| #include "WebCommon.h"
|
| +#include "public/platform/WebSocketHandle.h"
|
|
|
| namespace WebKit {
|
|
|
| class WebData;
|
| -class WebSocketStreamError;
|
| -class WebSocketStreamHandle;
|
| +class WebString;
|
| class WebURL;
|
|
|
| -class WebSocketStreamHandleClient {
|
| +// FIXME: This class should replace WebSocketStreamHandleClient.
|
| +class WebSocketHandleClient {
|
| public:
|
| -
|
| - // Called when Socket Stream is opened.
|
| - virtual void didOpenStream(WebSocketStreamHandle*, int /* maxPendingSendAllowed */) = 0;
|
| -
|
| - // Called when |amountSent| bytes are sent.
|
| - virtual void didSendData(WebSocketStreamHandle*, int /* amountSent */) = 0;
|
| + // Called when the handle is opened.
|
| + virtual void didConnect(WebSocketHandle*, bool succeed, const WebString& selectedProtocol, const WebString& extensions) = 0;
|
|
|
| // Called when data are received.
|
| - virtual void didReceiveData(WebSocketStreamHandle*, const WebData&) = 0;
|
| + virtual void didReceiveData(WebSocketHandle*, WebSocketHandle::MessageType, const char* data, size_t /* size */, bool fin) = 0;
|
|
|
| - // Called when Socket Stream is closed.
|
| - virtual void didClose(WebSocketStreamHandle*) = 0;
|
| + // Called when the handle is closed.
|
| + virtual void didClose(WebSocketHandle*, unsigned short code, const WebString& reason) = 0;
|
|
|
| - // Called when Socket Stream has an error.
|
| - virtual void didFail(WebSocketStreamHandle*, const WebSocketStreamError&) = 0;
|
| + virtual void didReceiveFlowControl(WebSocketHandle*, int64_t quota) = 0;
|
| };
|
|
|
| } // namespace WebKit
|
|
|
| -#endif
|
| +#endif // WebSocketHandleClient_h
|
|
|