OLD | NEW |
1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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_factory_impl.h" | 5 #include "mojo/services/network/web_socket_factory_impl.h" |
6 | 6 |
| 7 #include <utility> |
| 8 |
7 #include "mojo/services/network/web_socket_impl.h" | 9 #include "mojo/services/network/web_socket_impl.h" |
8 | 10 |
9 namespace mojo { | 11 namespace mojo { |
10 | 12 |
11 WebSocketFactoryImpl::WebSocketFactoryImpl( | 13 WebSocketFactoryImpl::WebSocketFactoryImpl( |
12 NetworkContext* context, | 14 NetworkContext* context, |
13 scoped_ptr<AppRefCount> app_refcount, | 15 scoped_ptr<AppRefCount> app_refcount, |
14 InterfaceRequest<WebSocketFactory> request) | 16 InterfaceRequest<WebSocketFactory> request) |
15 : context_(context), | 17 : context_(context), |
16 app_refcount_(app_refcount.Pass()), | 18 app_refcount_(std::move(app_refcount)), |
17 binding_(this, request.Pass()) { | 19 binding_(this, std::move(request)) {} |
18 } | |
19 | 20 |
20 WebSocketFactoryImpl::~WebSocketFactoryImpl() { | 21 WebSocketFactoryImpl::~WebSocketFactoryImpl() { |
21 } | 22 } |
22 | 23 |
23 void WebSocketFactoryImpl::CreateWebSocket(InterfaceRequest<WebSocket> socket) { | 24 void WebSocketFactoryImpl::CreateWebSocket(InterfaceRequest<WebSocket> socket) { |
24 new WebSocketImpl(context_, app_refcount_->Clone(), socket.Pass()); | 25 new WebSocketImpl(context_, app_refcount_->Clone(), std::move(socket)); |
25 } | 26 } |
26 | 27 |
27 } // namespace mojo | 28 } // namespace mojo |
OLD | NEW |