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

Side by Side Diff: mojo/services/network/web_socket_impl.cc

Issue 789243002: Restructure public side of network service. (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: Rebase Created 6 years 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 | « mojo/services/network/web_socket_impl.h ('k') | mojo/services/public/cpp/network/BUILD.gn » ('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 #include "mojo/services/network/web_socket_impl.h" 5 #include "mojo/services/network/web_socket_impl.h"
6 6
7 #include "base/logging.h" 7 #include "base/logging.h"
8 #include "base/message_loop/message_loop.h" 8 #include "base/message_loop/message_loop.h"
9 #include "mojo/common/handle_watcher.h" 9 #include "mojo/common/handle_watcher.h"
10 #include "mojo/services/network/network_context.h" 10 #include "mojo/services/network/network_context.h"
11 #include "mojo/services/public/cpp/network/web_socket_read_queue.h" 11 #include "mojo/services/network/public/cpp/web_socket_read_queue.h"
12 #include "mojo/services/public/cpp/network/web_socket_write_queue.h" 12 #include "mojo/services/network/public/cpp/web_socket_write_queue.h"
13 #include "net/websockets/websocket_channel.h" 13 #include "net/websockets/websocket_channel.h"
14 #include "net/websockets/websocket_errors.h" 14 #include "net/websockets/websocket_errors.h"
15 #include "net/websockets/websocket_event_interface.h" 15 #include "net/websockets/websocket_event_interface.h"
16 #include "net/websockets/websocket_frame.h" // for WebSocketFrameHeader::OpCode 16 #include "net/websockets/websocket_frame.h" // for WebSocketFrameHeader::OpCode
17 #include "net/websockets/websocket_handshake_request_info.h" 17 #include "net/websockets/websocket_handshake_request_info.h"
18 #include "net/websockets/websocket_handshake_response_info.h" 18 #include "net/websockets/websocket_handshake_response_info.h"
19 #include "url/origin.h" 19 #include "url/origin.h"
20 20
21 namespace mojo { 21 namespace mojo {
22 22
(...skipping 206 matching lines...) Expand 10 before | Expand all | Expand 10 after
229 uint32_t num_bytes, 229 uint32_t num_bytes,
230 const char* data) { 230 const char* data) {
231 std::vector<char> buffer(num_bytes); 231 std::vector<char> buffer(num_bytes);
232 memcpy(&buffer[0], data, num_bytes); 232 memcpy(&buffer[0], data, num_bytes);
233 DCHECK(channel_); 233 DCHECK(channel_);
234 channel_->SendFrame( 234 channel_->SendFrame(
235 fin, ConvertTo<net::WebSocketFrameHeader::OpCode>(type), buffer); 235 fin, ConvertTo<net::WebSocketFrameHeader::OpCode>(type), buffer);
236 } 236 }
237 237
238 } // namespace mojo 238 } // namespace mojo
OLDNEW
« no previous file with comments | « mojo/services/network/web_socket_impl.h ('k') | mojo/services/public/cpp/network/BUILD.gn » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698