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

Side by Side Diff: chrome/renderer/socket_stream_dispatcher.h

Issue 202058: WebSocket implementation in Chromium. (Closed)
Patch Set: update Created 11 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
« no previous file with comments | « chrome/renderer/renderer_glue.cc ('k') | chrome/renderer/socket_stream_dispatcher.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 // Copyright (c) 2009 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #ifndef CHROME_RENDERER_SOCKET_STREAM_DISPATCHER_H_
6 #define CHROME_RENDERER_SOCKET_STREAM_DISPATCHER_H_
7
8 #include <vector>
9
10 #include "base/basictypes.h"
11 #include "ipc/ipc_channel.h"
12 #include "ipc/ipc_message.h"
13 #include "webkit/glue/websocketstreamhandle_bridge.h"
14
15 // Dispatches socket stream related messages sent to a child process from the
16 // main browser process. There is one instance per child process. Messages
17 // are dispatched on the main child thread. The RenderThread class
18 // creates an instance and delegates calls to it.
19 class SocketStreamDispatcher {
20 public:
21 SocketStreamDispatcher();
22 ~SocketStreamDispatcher() {}
23
24 static webkit_glue::WebSocketStreamHandleBridge* CreateBridge(
25 WebKit::WebSocketStreamHandle* handle,
26 webkit_glue::WebSocketStreamHandleDelegate* delegate);
27 bool OnMessageReceived(const IPC::Message& msg);
28
29 private:
30 void OnConnected(int socket_id, int max_amount_send_allowed);
31 void OnSentData(int socket_id, int amount_sent);
32 void OnReceivedData(int socket_id, const std::vector<char>& data);
33 void OnClosed(int socket_id);
34
35 DISALLOW_COPY_AND_ASSIGN(SocketStreamDispatcher);
36 };
37
38 #endif // CHROME_RENDERER_SOCKET_STREAM_DISPATCHER_H_
OLDNEW
« no previous file with comments | « chrome/renderer/renderer_glue.cc ('k') | chrome/renderer/socket_stream_dispatcher.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698