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

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

Issue 3120021: FBTF: Header cleanup in chrome/common part 2. The majority of the changed files (Closed)
Patch Set: Win fix 2. Created 10 years, 4 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/common/serialized_script_value.cc ('k') | chrome/common/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
1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. 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 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 CHROME_COMMON_SOCKET_STREAM_DISPATCHER_H_ 5 #ifndef CHROME_COMMON_SOCKET_STREAM_DISPATCHER_H_
6 #define CHROME_COMMON_SOCKET_STREAM_DISPATCHER_H_ 6 #define CHROME_COMMON_SOCKET_STREAM_DISPATCHER_H_
7 #pragma once 7 #pragma once
8 8
9 #include <vector> 9 #include <vector>
10 10
11 #include "base/basictypes.h" 11 #include "base/basictypes.h"
12 #include "ipc/ipc_channel.h" 12
13 #include "ipc/ipc_message.h" 13 namespace IPC {
14 #include "webkit/glue/websocketstreamhandle_bridge.h" 14 class Message;
15 }
16
17 namespace WebKit {
18 class WebSocketStreamHandle;
19 }
20
21 namespace webkit_glue {
22 class WebSocketStreamHandleBridge;
23 class WebSocketStreamHandleDelegate;
24 }
15 25
16 // Dispatches socket stream related messages sent to a child process from the 26 // Dispatches socket stream related messages sent to a child process from the
17 // main browser process. There is one instance per child process. Messages 27 // main browser process. There is one instance per child process. Messages
18 // are dispatched on the main child thread. The RenderThread class 28 // are dispatched on the main child thread. The RenderThread class
19 // creates an instance of SocketStreamDispatcher and delegates calls to it. 29 // creates an instance of SocketStreamDispatcher and delegates calls to it.
20 class SocketStreamDispatcher { 30 class SocketStreamDispatcher {
21 public: 31 public:
22 SocketStreamDispatcher(); 32 SocketStreamDispatcher();
23 ~SocketStreamDispatcher() {} 33 ~SocketStreamDispatcher() {}
24 34
25 static webkit_glue::WebSocketStreamHandleBridge* CreateBridge( 35 static webkit_glue::WebSocketStreamHandleBridge* CreateBridge(
26 WebKit::WebSocketStreamHandle* handle, 36 WebKit::WebSocketStreamHandle* handle,
27 webkit_glue::WebSocketStreamHandleDelegate* delegate); 37 webkit_glue::WebSocketStreamHandleDelegate* delegate);
28 bool OnMessageReceived(const IPC::Message& msg); 38 bool OnMessageReceived(const IPC::Message& msg);
29 39
30 private: 40 private:
31 void OnConnected(int socket_id, int max_amount_send_allowed); 41 void OnConnected(int socket_id, int max_amount_send_allowed);
32 void OnSentData(int socket_id, int amount_sent); 42 void OnSentData(int socket_id, int amount_sent);
33 void OnReceivedData(int socket_id, const std::vector<char>& data); 43 void OnReceivedData(int socket_id, const std::vector<char>& data);
34 void OnClosed(int socket_id); 44 void OnClosed(int socket_id);
35 45
36 DISALLOW_COPY_AND_ASSIGN(SocketStreamDispatcher); 46 DISALLOW_COPY_AND_ASSIGN(SocketStreamDispatcher);
37 }; 47 };
38 48
39 #endif // CHROME_COMMON_SOCKET_STREAM_DISPATCHER_H_ 49 #endif // CHROME_COMMON_SOCKET_STREAM_DISPATCHER_H_
OLDNEW
« no previous file with comments | « chrome/common/serialized_script_value.cc ('k') | chrome/common/socket_stream_dispatcher.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698