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

Side by Side Diff: content/child/websocket_bridge.h

Issue 34753008: Notify WebSocket connection failure, chromium side (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Address a blink-side review comment 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
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef CONTENT_CHILD_WEBSOCKET_BRIDGE_H_ 5 #ifndef CONTENT_CHILD_WEBSOCKET_BRIDGE_H_
6 #define CONTENT_CHILD_WEBSOCKET_BRIDGE_H_ 6 #define CONTENT_CHILD_WEBSOCKET_BRIDGE_H_
7 7
8 #include <stdint.h> 8 #include <stdint.h>
9 #include <string> 9 #include <string>
10 #include <vector> 10 #include <vector>
(...skipping 29 matching lines...) Expand all
40 const WebKit::WebString& reason) OVERRIDE; 40 const WebKit::WebString& reason) OVERRIDE;
41 41
42 virtual void Disconnect(); 42 virtual void Disconnect();
43 43
44 private: 44 private:
45 virtual ~WebSocketBridge(); 45 virtual ~WebSocketBridge();
46 46
47 void DidConnect(bool fail, 47 void DidConnect(bool fail,
48 const std::string& selected_protocol, 48 const std::string& selected_protocol,
49 const std::string& extensions); 49 const std::string& extensions);
50 void DidFail(const std::string& message);
50 void DidReceiveData(bool fin, 51 void DidReceiveData(bool fin,
51 WebSocketMessageType type, 52 WebSocketMessageType type,
52 const std::vector<char>& data); 53 const std::vector<char>& data);
53 void DidReceiveFlowControl(int64_t quota); 54 void DidReceiveFlowControl(int64_t quota);
54 void DidClose(unsigned short code, const std::string& reason); 55 void DidClose(bool was_clean, unsigned short code, const std::string& reason);
55 56
56 int channel_id_; 57 int channel_id_;
57 WebKit::WebSocketHandleClient* client_; 58 WebKit::WebSocketHandleClient* client_;
58 59
59 static const int kInvalidChannelId = -1; 60 static const int kInvalidChannelId = -1;
60 }; 61 };
61 62
62 } // namespace content 63 } // namespace content
63 64
64 #endif // CONTENT_CHILD_WEBSOCKET_BRIDGE_H_ 65 #endif // CONTENT_CHILD_WEBSOCKET_BRIDGE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698