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

Side by Side Diff: mojo/services/html_viewer/websockethandle_impl.cc

Issue 629523003: Rename Get to GetProxy (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix device Created 6 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
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/html_viewer/websockethandle_impl.h" 5 #include "mojo/services/html_viewer/websockethandle_impl.h"
6 6
7 #include <vector> 7 #include <vector>
8 8
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/macros.h" 10 #include "base/macros.h"
(...skipping 127 matching lines...) Expand 10 before | Expand all | Expand 10 after
138 WebSocketHandleImpl* handle_; 138 WebSocketHandleImpl* handle_;
139 blink::WebSocketHandleClient* client_; 139 blink::WebSocketHandleClient* client_;
140 ScopedDataPipeConsumerHandle receive_stream_; 140 ScopedDataPipeConsumerHandle receive_stream_;
141 scoped_ptr<WebSocketReadQueue> read_queue_; 141 scoped_ptr<WebSocketReadQueue> read_queue_;
142 142
143 DISALLOW_COPY_AND_ASSIGN(WebSocketClientImpl); 143 DISALLOW_COPY_AND_ASSIGN(WebSocketClientImpl);
144 }; 144 };
145 145
146 WebSocketHandleImpl::WebSocketHandleImpl(NetworkService* network_service) 146 WebSocketHandleImpl::WebSocketHandleImpl(NetworkService* network_service)
147 : did_close_(false) { 147 : did_close_(false) {
148 network_service->CreateWebSocket(Get(&web_socket_)); 148 network_service->CreateWebSocket(GetProxy(&web_socket_));
149 } 149 }
150 150
151 WebSocketHandleImpl::~WebSocketHandleImpl() { 151 WebSocketHandleImpl::~WebSocketHandleImpl() {
152 if (!did_close_) { 152 if (!did_close_) {
153 // The connection is abruptly disconnected by the renderer without 153 // The connection is abruptly disconnected by the renderer without
154 // closing handshake. 154 // closing handshake.
155 web_socket_->Close(WebSocket::kAbnormalCloseCode, String()); 155 web_socket_->Close(WebSocket::kAbnormalCloseCode, String());
156 } 156 }
157 } 157 }
158 158
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after
209 const char* data) { 209 const char* data) {
210 web_socket_->Send(fin, ConvertTo<WebSocket::MessageType>(type), num_bytes); 210 web_socket_->Send(fin, ConvertTo<WebSocket::MessageType>(type), num_bytes);
211 } 211 }
212 212
213 void WebSocketHandleImpl::Disconnect() { 213 void WebSocketHandleImpl::Disconnect() {
214 did_close_ = true; 214 did_close_ = true;
215 client_.reset(); 215 client_.reset();
216 } 216 }
217 217
218 } // namespace mojo 218 } // namespace mojo
OLDNEW
« no previous file with comments | « mojo/services/html_viewer/weblayertreeview_impl.cc ('k') | mojo/services/html_viewer/weburlloader_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698