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

Side by Side Diff: components/mus/ws/view_tree_host_connection.cc

Issue 1406153004: components/mus/public/interfaces View => Window (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Yet another rebase Created 5 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 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/ws/view_tree_host_connection.h" 5 #include "components/mus/ws/view_tree_host_connection.h"
6 6
7 #include "components/mus/ws/connection_manager.h" 7 #include "components/mus/ws/connection_manager.h"
8 #include "components/mus/ws/view_tree_host_impl.h" 8 #include "components/mus/ws/view_tree_host_impl.h"
9 9
10 namespace mus { 10 namespace mus {
(...skipping 18 matching lines...) Expand all
29 if (connection_closed_) 29 if (connection_closed_)
30 return; 30 return;
31 // We have to shut down the focus system for this host before destroying the 31 // We have to shut down the focus system for this host before destroying the
32 // host, as destruction of the view tree will attempt to change focus. 32 // host, as destruction of the view tree will attempt to change focus.
33 host_->DestroyFocusController(); 33 host_->DestroyFocusController();
34 connection_manager()->OnHostConnectionClosed(this); 34 connection_manager()->OnHostConnectionClosed(this);
35 connection_closed_ = true; 35 connection_closed_ = true;
36 delete this; 36 delete this;
37 } 37 }
38 38
39 ViewTreeImpl* ViewTreeHostConnection::GetViewTree() { 39 ViewTreeImpl* ViewTreeHostConnection::GetWindowTree() {
40 return tree_; 40 return tree_;
41 } 41 }
42 42
43 void ViewTreeHostConnection::OnDisplayInitialized() {} 43 void ViewTreeHostConnection::OnDisplayInitialized() {}
44 44
45 void ViewTreeHostConnection::OnDisplayClosed() { 45 void ViewTreeHostConnection::OnDisplayClosed() {
46 CloseConnection(); 46 CloseConnection();
47 } 47 }
48 48
49 ViewTreeHostConnectionImpl::ViewTreeHostConnectionImpl( 49 ViewTreeHostConnectionImpl::ViewTreeHostConnectionImpl(
50 mojo::InterfaceRequest<mojo::ViewTreeHost> request, 50 mojo::InterfaceRequest<mojom::WindowTreeHost> request,
51 scoped_ptr<ViewTreeHostImpl> host_impl, 51 scoped_ptr<ViewTreeHostImpl> host_impl,
52 mojo::ViewTreeClientPtr client, 52 mojom::WindowTreeClientPtr client,
53 ConnectionManager* manager) 53 ConnectionManager* manager)
54 : ViewTreeHostConnection(host_impl.Pass(), manager), 54 : ViewTreeHostConnection(host_impl.Pass(), manager),
55 binding_(view_tree_host(), request.Pass()), 55 binding_(view_tree_host(), request.Pass()),
56 client_(client.Pass()) {} 56 client_(client.Pass()) {}
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 mojom::WindowTree::ACCESS_POLICY_EMBED_ROOT, client_.Pass()));
65 } 65 }
66 66
67 } // namespace mus 67 } // namespace mus
OLDNEW
« no previous file with comments | « components/mus/ws/view_tree_host_connection.h ('k') | components/mus/ws/view_tree_host_delegate.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698