OLD | NEW |
| (Empty) |
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 | |
3 // found in the LICENSE file. | |
4 | |
5 #include "mojo/services/view_manager/client_connection.h" | |
6 | |
7 #include "mojo/services/view_manager/connection_manager.h" | |
8 #include "mojo/services/view_manager/view_manager_service_impl.h" | |
9 | |
10 namespace mojo { | |
11 namespace service { | |
12 | |
13 ClientConnection::ClientConnection(scoped_ptr<ViewManagerServiceImpl> service) | |
14 : service_(service.Pass()), client_(nullptr) { | |
15 } | |
16 | |
17 ClientConnection::~ClientConnection() { | |
18 } | |
19 | |
20 DefaultClientConnection::DefaultClientConnection( | |
21 scoped_ptr<ViewManagerServiceImpl> service_impl, | |
22 ConnectionManager* connection_manager, | |
23 ScopedMessagePipeHandle handle) | |
24 : ClientConnection(service_impl.Pass()), | |
25 connection_manager_(connection_manager), | |
26 binding_(service(), handle.Pass()) { | |
27 binding_.set_error_handler(this); | |
28 set_client(binding_.client()); | |
29 } | |
30 | |
31 DefaultClientConnection::~DefaultClientConnection() { | |
32 } | |
33 | |
34 void DefaultClientConnection::OnConnectionError() { | |
35 connection_manager_->OnConnectionError(this); | |
36 } | |
37 | |
38 } // namespace service | |
39 } // namespace mojo | |
OLD | NEW |