Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(485)

Side by Side Diff: Source/modules/websockets/NewWebSocketChannelImpl.h

Issue 36033003: Notify WebSocket connection failure, Blink side (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 7 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2013 Google Inc. All rights reserved. 2 * Copyright (C) 2013 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 108 matching lines...) Expand 10 before | Expand all | Expand 10 after
119 class Resumer; 119 class Resumer;
120 120
121 NewWebSocketChannelImpl(ExecutionContext*, WebSocketChannelClient*, const St ring&, unsigned); 121 NewWebSocketChannelImpl(ExecutionContext*, WebSocketChannelClient*, const St ring&, unsigned);
122 void sendInternal(); 122 void sendInternal();
123 void flowControlIfNecessary(); 123 void flowControlIfNecessary();
124 void failAsError(const String& reason) { fail(reason, ErrorMessageLevel, "", 0); } 124 void failAsError(const String& reason) { fail(reason, ErrorMessageLevel, "", 0); }
125 void abortAsyncOperations(); 125 void abortAsyncOperations();
126 126
127 // WebSocketHandleClient functions. 127 // WebSocketHandleClient functions.
128 virtual void didConnect(WebKit::WebSocketHandle*, bool fail, const WebKit::W ebString& selectedProtocol, const WebKit::WebString& extensions) OVERRIDE; 128 virtual void didConnect(WebKit::WebSocketHandle*, bool fail, const WebKit::W ebString& selectedProtocol, const WebKit::WebString& extensions) OVERRIDE;
129 virtual void didFail(WebKit::WebSocketHandle*, const WebKit::WebString& mess age) OVERRIDE;
129 virtual void didReceiveData(WebKit::WebSocketHandle*, bool fin, WebKit::WebS ocketHandle::MessageType, const char* data, size_t /* size */) OVERRIDE; 130 virtual void didReceiveData(WebKit::WebSocketHandle*, bool fin, WebKit::WebS ocketHandle::MessageType, const char* data, size_t /* size */) OVERRIDE;
130 virtual void didClose(WebKit::WebSocketHandle*, unsigned short code, const W ebKit::WebString& reason) OVERRIDE; 131 virtual void didClose(WebKit::WebSocketHandle*, bool wasClean, unsigned shor t code, const WebKit::WebString& reason) OVERRIDE;
131 virtual void didReceiveFlowControl(WebKit::WebSocketHandle*, int64_t quota) OVERRIDE { m_sendingQuota += quota; } 132 virtual void didReceiveFlowControl(WebKit::WebSocketHandle*, int64_t quota) OVERRIDE { m_sendingQuota += quota; }
132 133
133 // Methods for BlobLoader. 134 // Methods for BlobLoader.
134 void didFinishLoadingBlob(PassRefPtr<ArrayBuffer>); 135 void didFinishLoadingBlob(PassRefPtr<ArrayBuffer>);
135 void didFailLoadingBlob(FileError::ErrorCode); 136 void didFailLoadingBlob(FileError::ErrorCode);
136 137
137 // WebSocketChannel functions. 138 // WebSocketChannel functions.
138 virtual void refWebSocketChannel() OVERRIDE { ref(); } 139 virtual void refWebSocketChannel() OVERRIDE { ref(); }
139 virtual void derefWebSocketChannel() OVERRIDE { deref(); } 140 virtual void derefWebSocketChannel() OVERRIDE { deref(); }
140 141
(...skipping 22 matching lines...) Expand all
163 size_t m_sentSizeOfTopMessage; 164 size_t m_sentSizeOfTopMessage;
164 String m_subprotocol; 165 String m_subprotocol;
165 String m_extensions; 166 String m_extensions;
166 167
167 static const int64_t receivedDataSizeForFlowControlHighWaterMark = 1 << 15; 168 static const int64_t receivedDataSizeForFlowControlHighWaterMark = 1 << 15;
168 }; 169 };
169 170
170 } // namespace WebCore 171 } // namespace WebCore
171 172
172 #endif // NewWebSocketChannelImpl_h 173 #endif // NewWebSocketChannelImpl_h
OLDNEW
« no previous file with comments | « no previous file | Source/modules/websockets/NewWebSocketChannelImpl.cpp » ('j') | public/platform/WebSocketHandleClient.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698