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 "components/mus/view_tree_host_connection.h" | 5 #include "components/mus/view_tree_host_connection.h" |
6 | 6 |
7 #include "components/mus/connection_manager.h" | 7 #include "components/mus/connection_manager.h" |
8 #include "components/mus/view_tree_host_impl.h" | 8 #include "components/mus/view_tree_host_impl.h" |
9 | 9 |
10 namespace mus { | 10 namespace view_manager { |
11 | 11 |
12 ViewTreeHostConnection::ViewTreeHostConnection( | 12 ViewTreeHostConnection::ViewTreeHostConnection( |
13 scoped_ptr<ViewTreeHostImpl> host_impl, | 13 scoped_ptr<ViewTreeHostImpl> host_impl, |
14 ConnectionManager* manager) | 14 ConnectionManager* manager) |
15 : host_(host_impl.Pass()), | 15 : host_(host_impl.Pass()), |
16 tree_(nullptr), | 16 tree_(nullptr), |
17 connection_manager_(manager), | 17 connection_manager_(manager), |
18 connection_closed_(false) {} | 18 connection_closed_(false) {} |
19 | 19 |
20 ViewTreeHostConnection::~ViewTreeHostConnection() { | 20 ViewTreeHostConnection::~ViewTreeHostConnection() { |
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
57 | 57 |
58 ViewTreeHostConnectionImpl::~ViewTreeHostConnectionImpl() {} | 58 ViewTreeHostConnectionImpl::~ViewTreeHostConnectionImpl() {} |
59 | 59 |
60 void ViewTreeHostConnectionImpl::OnDisplayInitialized() { | 60 void ViewTreeHostConnectionImpl::OnDisplayInitialized() { |
61 connection_manager()->AddHost(this); | 61 connection_manager()->AddHost(this); |
62 set_view_tree(connection_manager()->EmbedAtView( | 62 set_view_tree(connection_manager()->EmbedAtView( |
63 kInvalidConnectionId, view_tree_host()->root_view()->id(), | 63 kInvalidConnectionId, view_tree_host()->root_view()->id(), |
64 mojo::ViewTree::ACCESS_POLICY_EMBED_ROOT, client_.Pass())); | 64 mojo::ViewTree::ACCESS_POLICY_EMBED_ROOT, client_.Pass())); |
65 } | 65 } |
66 | 66 |
67 } // namespace mus | 67 } // namespace view_manager |
OLD | NEW |