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

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, 1 month 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
« no previous file with comments | « no previous file | Source/modules/websockets/NewWebSocketChannelImpl.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 105 matching lines...) Expand 10 before | Expand all | Expand 10 after
116 NewWebSocketChannelImpl(ExecutionContext*, WebSocketChannelClient*, const St ring&, unsigned); 116 NewWebSocketChannelImpl(ExecutionContext*, WebSocketChannelClient*, const St ring&, unsigned);
117 void sendInternal(); 117 void sendInternal();
118 void flowControlIfNecessary(); 118 void flowControlIfNecessary();
119 void failAsError(const String& reason) { fail(reason, ErrorMessageLevel, m_s ourceURLAtConnection, m_lineNumberAtConnection); } 119 void failAsError(const String& reason) { fail(reason, ErrorMessageLevel, m_s ourceURLAtConnection, m_lineNumberAtConnection); }
120 void abortAsyncOperations(); 120 void abortAsyncOperations();
121 void handleDidClose(unsigned short code, const String& reason); 121 void handleDidClose(unsigned short code, const String& reason);
122 Document* document(); // can be called only when m_identifier > 0. 122 Document* document(); // can be called only when m_identifier > 0.
123 123
124 // WebSocketHandleClient functions. 124 // WebSocketHandleClient functions.
125 virtual void didConnect(WebKit::WebSocketHandle*, bool fail, const WebKit::W ebString& selectedProtocol, const WebKit::WebString& extensions) OVERRIDE; 125 virtual void didConnect(WebKit::WebSocketHandle*, bool fail, const WebKit::W ebString& selectedProtocol, const WebKit::WebString& extensions) OVERRIDE;
126 virtual void didFail(WebKit::WebSocketHandle*, const WebKit::WebString& mess age) OVERRIDE;
126 virtual void didReceiveData(WebKit::WebSocketHandle*, bool fin, WebKit::WebS ocketHandle::MessageType, const char* data, size_t /* size */) OVERRIDE; 127 virtual void didReceiveData(WebKit::WebSocketHandle*, bool fin, WebKit::WebS ocketHandle::MessageType, const char* data, size_t /* size */) OVERRIDE;
127 virtual void didClose(WebKit::WebSocketHandle*, unsigned short code, const W ebKit::WebString& reason) OVERRIDE; 128 virtual void didClose(WebKit::WebSocketHandle*, bool wasClean, unsigned shor t code, const WebKit::WebString& reason) OVERRIDE;
128 virtual void didReceiveFlowControl(WebKit::WebSocketHandle*, int64_t quota) OVERRIDE { m_sendingQuota += quota; } 129 virtual void didReceiveFlowControl(WebKit::WebSocketHandle*, int64_t quota) OVERRIDE { m_sendingQuota += quota; }
129 130
130 // Methods for BlobLoader. 131 // Methods for BlobLoader.
131 void didFinishLoadingBlob(PassRefPtr<ArrayBuffer>); 132 void didFinishLoadingBlob(PassRefPtr<ArrayBuffer>);
132 void didFailLoadingBlob(FileError::ErrorCode); 133 void didFailLoadingBlob(FileError::ErrorCode);
133 134
134 // WebSocketChannel functions. 135 // WebSocketChannel functions.
135 virtual void refWebSocketChannel() OVERRIDE { ref(); } 136 virtual void refWebSocketChannel() OVERRIDE { ref(); }
136 virtual void derefWebSocketChannel() OVERRIDE { deref(); } 137 virtual void derefWebSocketChannel() OVERRIDE { deref(); }
137 138
(...skipping 25 matching lines...) Expand all
163 164
164 String m_sourceURLAtConnection; 165 String m_sourceURLAtConnection;
165 unsigned m_lineNumberAtConnection; 166 unsigned m_lineNumberAtConnection;
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') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698