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

Side by Side Diff: components/html_viewer/web_socket_handle_impl.h

Issue 1574213003: [ABANDONED] Use new Websocket SendBlob IPC from renderer. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@websocket_blob_send_sender
Patch Set: Comment that bufferedAmount may be temporarily too low. Created 4 years, 10 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
« no previous file with comments | « no previous file | components/html_viewer/web_socket_handle_impl.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 COMPONENTS_HTML_VIEWER_WEB_SOCKET_HANDLE_IMPL_H_ 5 #ifndef COMPONENTS_HTML_VIEWER_WEB_SOCKET_HANDLE_IMPL_H_
6 #define COMPONENTS_HTML_VIEWER_WEB_SOCKET_HANDLE_IMPL_H_ 6 #define COMPONENTS_HTML_VIEWER_WEB_SOCKET_HANDLE_IMPL_H_
7 7
8 #include <stddef.h> 8 #include <stddef.h>
9 #include <stdint.h> 9 #include <stdint.h>
10 10
(...skipping 21 matching lines...) Expand all
32 friend class WebSocketClientImpl; 32 friend class WebSocketClientImpl;
33 33
34 ~WebSocketHandleImpl() override; 34 ~WebSocketHandleImpl() override;
35 35
36 // blink::WebSocketHandle methods: 36 // blink::WebSocketHandle methods:
37 void connect(const blink::WebURL& url, 37 void connect(const blink::WebURL& url,
38 const blink::WebVector<blink::WebString>& protocols, 38 const blink::WebVector<blink::WebString>& protocols,
39 const blink::WebSecurityOrigin& origin, 39 const blink::WebSecurityOrigin& origin,
40 blink::WebSocketHandleClient*) override; 40 blink::WebSocketHandleClient*) override;
41 void send(bool fin, MessageType, const char* data, size_t size) override; 41 void send(bool fin, MessageType, const char* data, size_t size) override;
42 void sendBlob(const blink::WebString& uuid, uint64_t expectedSize) override;
42 void flowControl(int64_t quota) override; 43 void flowControl(int64_t quota) override;
43 void close(unsigned short code, const blink::WebString& reason) override; 44 void close(unsigned short code, const blink::WebString& reason) override;
44 45
45 // Called when we finished writing to |send_stream_|. 46 // Called when we finished writing to |send_stream_|.
46 void DidWriteToSendStream(bool fin, 47 void DidWriteToSendStream(bool fin,
47 WebSocketHandle::MessageType type, 48 WebSocketHandle::MessageType type,
48 uint32_t num_bytes, 49 uint32_t num_bytes,
49 const char* data); 50 const char* data);
50 51
51 // Called when the socket is closed. 52 // Called when the socket is closed.
52 void Disconnect(); 53 void Disconnect();
53 54
54 mojo::WebSocketPtr web_socket_; 55 mojo::WebSocketPtr web_socket_;
55 scoped_ptr<WebSocketClientImpl> client_; 56 scoped_ptr<WebSocketClientImpl> client_;
56 mojo::ScopedDataPipeProducerHandle send_stream_; 57 mojo::ScopedDataPipeProducerHandle send_stream_;
57 scoped_ptr<mojo::WebSocketWriteQueue> write_queue_; 58 scoped_ptr<mojo::WebSocketWriteQueue> write_queue_;
58 // True if close() was called. 59 // True if close() was called.
59 bool did_close_; 60 bool did_close_;
60 61
61 DISALLOW_COPY_AND_ASSIGN(WebSocketHandleImpl); 62 DISALLOW_COPY_AND_ASSIGN(WebSocketHandleImpl);
62 }; 63 };
63 64
64 } // namespace html_viewer 65 } // namespace html_viewer
65 66
66 #endif // COMPONENTS_HTML_VIEWER_WEB_SOCKET_HANDLE_IMPL_H_ 67 #endif // COMPONENTS_HTML_VIEWER_WEB_SOCKET_HANDLE_IMPL_H_
OLDNEW
« no previous file with comments | « no previous file | components/html_viewer/web_socket_handle_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698