| 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 "base/bind.h" | 5 #include "base/bind.h" |
| 6 #include "base/message_loop/message_loop.h" | 6 #include "base/message_loop/message_loop.h" |
| 7 #include "base/run_loop.h" | 7 #include "base/run_loop.h" |
| 8 #include "base/strings/stringprintf.h" | 8 #include "base/strings/stringprintf.h" |
| 9 #include "components/view_manager/ids.h" | 9 #include "components/view_manager/ids.h" |
| 10 #include "components/view_manager/public/interfaces/view_tree.mojom.h" | 10 #include "components/view_manager/public/interfaces/view_tree.mojom.h" |
| (...skipping 285 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 296 if (wait_state_.get() && | 296 if (wait_state_.get() && |
| 297 wait_state_->change_count == tracker_.changes()->size()) { | 297 wait_state_->change_count == tracker_.changes()->size()) { |
| 298 wait_state_->run_loop.Quit(); | 298 wait_state_->run_loop.Quit(); |
| 299 } | 299 } |
| 300 } | 300 } |
| 301 | 301 |
| 302 // ViewTreeClient: | 302 // ViewTreeClient: |
| 303 void OnEmbed(ConnectionSpecificId connection_id, | 303 void OnEmbed(ConnectionSpecificId connection_id, |
| 304 ViewDataPtr root, | 304 ViewDataPtr root, |
| 305 mojo::ViewTreePtr tree, | 305 mojo::ViewTreePtr tree, |
| 306 mojo::Id focused_view_id) override { | 306 mojo::Id focused_view_id, |
| 307 uint32_t access_policy) override { |
| 307 // TODO(sky): add coverage of |focused_view_id|. | 308 // TODO(sky): add coverage of |focused_view_id|. |
| 308 tree_ = tree.Pass(); | 309 tree_ = tree.Pass(); |
| 309 connection_id_ = connection_id; | 310 connection_id_ = connection_id; |
| 310 tracker()->OnEmbed(connection_id, root.Pass()); | 311 tracker()->OnEmbed(connection_id, root.Pass()); |
| 311 if (embed_run_loop_) | 312 if (embed_run_loop_) |
| 312 embed_run_loop_->Quit(); | 313 embed_run_loop_->Quit(); |
| 313 } | 314 } |
| 314 void OnEmbeddedAppDisconnected(Id view_id) override { | 315 void OnEmbeddedAppDisconnected(Id view_id) override { |
| 315 tracker()->OnEmbeddedAppDisconnected(view_id); | 316 tracker()->OnEmbeddedAppDisconnected(view_id); |
| 316 } | 317 } |
| (...skipping 1300 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1617 // TODO(sky): need to better track changes to initial connection. For example, | 1618 // TODO(sky): need to better track changes to initial connection. For example, |
| 1618 // that SetBounsdViews/AddView and the like don't result in messages to the | 1619 // that SetBounsdViews/AddView and the like don't result in messages to the |
| 1619 // originating connection. | 1620 // originating connection. |
| 1620 | 1621 |
| 1621 // TODO(sky): make sure coverage of what was | 1622 // TODO(sky): make sure coverage of what was |
| 1622 // ViewManagerTest.SecondEmbedRoot_InitService and | 1623 // ViewManagerTest.SecondEmbedRoot_InitService and |
| 1623 // ViewManagerTest.MultipleEmbedRootsBeforeWTHReady gets added to window manager | 1624 // ViewManagerTest.MultipleEmbedRootsBeforeWTHReady gets added to window manager |
| 1624 // tests. | 1625 // tests. |
| 1625 | 1626 |
| 1626 } // namespace view_manager | 1627 } // namespace view_manager |
| OLD | NEW |