| 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 "mojo/public/cpp/application/application_delegate.h" | 8 #include "mojo/public/cpp/application/application_delegate.h" |
| 9 #include "mojo/public/cpp/application/application_impl.h" | 9 #include "mojo/public/cpp/application/application_impl.h" |
| 10 #include "mojo/public/cpp/application/application_test_base.h" | 10 #include "mojo/public/cpp/application/application_test_base.h" |
| (...skipping 16 matching lines...) Expand all Loading... |
| 27 using mojo::ORDER_DIRECTION_ABOVE; | 27 using mojo::ORDER_DIRECTION_ABOVE; |
| 28 using mojo::ORDER_DIRECTION_BELOW; | 28 using mojo::ORDER_DIRECTION_BELOW; |
| 29 using mojo::OrderDirection; | 29 using mojo::OrderDirection; |
| 30 using mojo::RectPtr; | 30 using mojo::RectPtr; |
| 31 using mojo::ServiceProvider; | 31 using mojo::ServiceProvider; |
| 32 using mojo::ServiceProviderPtr; | 32 using mojo::ServiceProviderPtr; |
| 33 using mojo::String; | 33 using mojo::String; |
| 34 using mojo::ViewDataPtr; | 34 using mojo::ViewDataPtr; |
| 35 using mojo::ViewManagerClient; | 35 using mojo::ViewManagerClient; |
| 36 using mojo::ViewManagerService; | 36 using mojo::ViewManagerService; |
| 37 using mojo::ViewportMetricsPtr; |
| 37 | 38 |
| 38 namespace view_manager { | 39 namespace view_manager { |
| 39 | 40 |
| 40 // Creates an id used for transport from the specified parameters. | 41 // Creates an id used for transport from the specified parameters. |
| 41 Id BuildViewId(ConnectionSpecificId connection_id, | 42 Id BuildViewId(ConnectionSpecificId connection_id, |
| 42 ConnectionSpecificId view_id) { | 43 ConnectionSpecificId view_id) { |
| 43 return (connection_id << 16) | view_id; | 44 return (connection_id << 16) | view_id; |
| 44 } | 45 } |
| 45 | 46 |
| 46 // Callback function from ViewManagerService functions. ------------------------ | 47 // Callback function from ViewManagerService functions. ------------------------ |
| (...skipping 227 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 274 } | 275 } |
| 275 void OnEmbeddedAppDisconnected(Id view_id) override { | 276 void OnEmbeddedAppDisconnected(Id view_id) override { |
| 276 tracker()->OnEmbeddedAppDisconnected(view_id); | 277 tracker()->OnEmbeddedAppDisconnected(view_id); |
| 277 } | 278 } |
| 278 void OnViewBoundsChanged(Id view_id, | 279 void OnViewBoundsChanged(Id view_id, |
| 279 RectPtr old_bounds, | 280 RectPtr old_bounds, |
| 280 RectPtr new_bounds) override { | 281 RectPtr new_bounds) override { |
| 281 tracker()->OnViewBoundsChanged(view_id, old_bounds.Pass(), | 282 tracker()->OnViewBoundsChanged(view_id, old_bounds.Pass(), |
| 282 new_bounds.Pass()); | 283 new_bounds.Pass()); |
| 283 } | 284 } |
| 285 void OnViewViewportMetricsChanged(ViewportMetricsPtr old_metrics, |
| 286 ViewportMetricsPtr new_metrics) override { |
| 287 tracker()->OnViewViewportMetricsChanged(old_metrics.Pass(), |
| 288 new_metrics.Pass()); |
| 289 } |
| 284 void OnViewHierarchyChanged(Id view, | 290 void OnViewHierarchyChanged(Id view, |
| 285 Id new_parent, | 291 Id new_parent, |
| 286 Id old_parent, | 292 Id old_parent, |
| 287 Array<ViewDataPtr> views) override { | 293 Array<ViewDataPtr> views) override { |
| 288 tracker()->OnViewHierarchyChanged(view, new_parent, old_parent, | 294 tracker()->OnViewHierarchyChanged(view, new_parent, old_parent, |
| 289 views.Pass()); | 295 views.Pass()); |
| 290 } | 296 } |
| 291 void OnViewReordered(Id view_id, | 297 void OnViewReordered(Id view_id, |
| 292 Id relative_view_id, | 298 Id relative_view_id, |
| 293 OrderDirection direction) override { | 299 OrderDirection direction) override { |
| (...skipping 1120 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1414 // TODO(sky): need to better track changes to initial connection. For example, | 1420 // TODO(sky): need to better track changes to initial connection. For example, |
| 1415 // that SetBounsdViews/AddView and the like don't result in messages to the | 1421 // that SetBounsdViews/AddView and the like don't result in messages to the |
| 1416 // originating connection. | 1422 // originating connection. |
| 1417 | 1423 |
| 1418 // TODO(sky): make sure coverage of what was | 1424 // TODO(sky): make sure coverage of what was |
| 1419 // ViewManagerTest.SecondEmbedRoot_InitService and | 1425 // ViewManagerTest.SecondEmbedRoot_InitService and |
| 1420 // ViewManagerTest.MultipleEmbedRootsBeforeWTHReady gets added to window manager | 1426 // ViewManagerTest.MultipleEmbedRootsBeforeWTHReady gets added to window manager |
| 1421 // tests. | 1427 // tests. |
| 1422 | 1428 |
| 1423 } // namespace view_manager | 1429 } // namespace view_manager |
| OLD | NEW |