OLD | NEW |
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 "components/view_manager/client_connection.h" | 5 #include "components/view_manager/client_connection.h" |
6 | 6 |
7 #include "components/view_manager/connection_manager.h" | 7 #include "components/view_manager/connection_manager.h" |
8 #include "components/view_manager/view_manager_service_impl.h" | 8 #include "components/view_manager/view_tree_impl.h" |
9 | 9 |
10 namespace view_manager { | 10 namespace view_manager { |
11 | 11 |
12 ClientConnection::ClientConnection(scoped_ptr<ViewManagerServiceImpl> service, | 12 ClientConnection::ClientConnection(scoped_ptr<ViewTreeImpl> service, |
13 mojo::ViewManagerClient* client) | 13 mojo::ViewTreeClient* client) |
14 : service_(service.Pass()), client_(client) { | 14 : service_(service.Pass()), client_(client) { |
15 } | 15 } |
16 | 16 |
17 ClientConnection::~ClientConnection() { | 17 ClientConnection::~ClientConnection() { |
18 } | 18 } |
19 | 19 |
20 DefaultClientConnection::DefaultClientConnection( | 20 DefaultClientConnection::DefaultClientConnection( |
21 scoped_ptr<ViewManagerServiceImpl> service_impl, | 21 scoped_ptr<ViewTreeImpl> service_impl, |
22 ConnectionManager* connection_manager, | 22 ConnectionManager* connection_manager, |
23 mojo::InterfaceRequest<mojo::ViewManagerService> service_request, | 23 mojo::InterfaceRequest<mojo::ViewTree> service_request, |
24 mojo::ViewManagerClientPtr client) | 24 mojo::ViewTreeClientPtr client) |
25 : ClientConnection(service_impl.Pass(), client.get()), | 25 : ClientConnection(service_impl.Pass(), client.get()), |
26 connection_manager_(connection_manager), | 26 connection_manager_(connection_manager), |
27 binding_(service(), service_request.Pass()), | 27 binding_(service(), service_request.Pass()), |
28 client_(client.Pass()) { | 28 client_(client.Pass()) { |
29 binding_.set_connection_error_handler( | 29 binding_.set_connection_error_handler( |
30 [this]() { connection_manager_->OnConnectionError(this); }); | 30 [this]() { connection_manager_->OnConnectionError(this); }); |
31 } | 31 } |
32 | 32 |
33 DefaultClientConnection::~DefaultClientConnection() { | 33 DefaultClientConnection::~DefaultClientConnection() { |
34 } | 34 } |
35 | 35 |
36 } // namespace view_manager | 36 } // namespace view_manager |
OLD | NEW |