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

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

Issue 22815034: Introduce webkit_glue bridges for the new WebSocket Implementation. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 7 years, 3 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 | « content/child/webkitplatformsupport_impl.cc ('k') | content/child/websocket_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) 2013 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 CONTENT_CHILD_WEBSOCKET_DISPATCHER_H_
6 #define CONTENT_CHILD_WEBSOCKET_DISPATCHER_H_
7
8 #include <string>
9 #include <vector>
10
11 #include "base/basictypes.h"
12 #include "base/compiler_specific.h"
13 #include "content/common/websocket.h"
tyoshino (SeeGerritForStatus) 2013/08/29 11:30:59 move this to .cc?
yhirano 2013/08/29 11:45:44 This is necessary to declare OnReceivedData.
yhirano 2013/08/30 05:46:56 Done.
tyoshino (SeeGerritForStatus) 2013/09/03 07:18:30 Got it
14 #include "ipc/ipc_listener.h"
15
16 namespace webkit_glue {
17 class WebSocketHandleBridge;
18 class WebSocketHandleDelegate;
19 }
20
21 namespace content {
22
23 // Dispatches WebSocket related messages sent to a child process from the
24 // main browser process. There is one instance per child process. Messages
25 // are dispatched on the main child thread. The RenderThread class
26 // creates an instance of WebSocketDispatcher and delegates calls to it.
27 class WebSocketDispatcher : public IPC::Listener {
28 public:
29 WebSocketDispatcher();
30 virtual ~WebSocketDispatcher() {}
31
32 static webkit_glue::WebSocketHandleBridge* CreateBridge(
33 webkit_glue::WebSocketHandleDelegate* delegate);
34
35 // IPC::Listener implementation.
36 virtual bool OnMessageReceived(const IPC::Message& msg) OVERRIDE;
37
38 private:
39 void OnConnected(int channel_id,
40 bool fail,
41 std::string selected_protocol,
42 std::string extensions);
43 void OnReceivedData(int channel_id,
44 bool fin,
45 content::WebSocketMessageType type,
46 std::vector<char> data);
tyoshino (SeeGerritForStatus) 2013/08/29 11:30:59 Use the same order (fin is last argument) as WebSo
yhirano 2013/08/29 11:45:44 I see, I will change blink-side implementation. Is
47 void OnReceivedFlowControl(int channel_id, int64 quota);
48 void OnClosed(int channel_id, unsigned short code, std::string reason);
49
50 DISALLOW_COPY_AND_ASSIGN(WebSocketDispatcher);
51 };
52
53 } // namespace content
54
55 #endif // CONTENT_CHILD_WEBSOCKET_DISPATCHER_H_
OLDNEW
« no previous file with comments | « content/child/webkitplatformsupport_impl.cc ('k') | content/child/websocket_dispatcher.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698