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_manager.mojom.h" | 10 #include "components/view_manager/public/interfaces/view_manager.mojom.h" |
(...skipping 334 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
345 mojo::ViewManagerClientPtr client; | 345 mojo::ViewManagerClientPtr client; |
346 scoped_ptr<ApplicationConnection> connection = | 346 scoped_ptr<ApplicationConnection> connection = |
347 app_->ConnectToApplication(request.Pass()); | 347 app_->ConnectToApplication(request.Pass()); |
348 connection->ConnectToService(&client); | 348 connection->ConnectToService(&client); |
349 callback.Run(client.Pass()); | 349 callback.Run(client.Pass()); |
350 } | 350 } |
351 void OnEmbeddedAppDisconnected(Id view_id) override { | 351 void OnEmbeddedAppDisconnected(Id view_id) override { |
352 tracker()->OnEmbeddedAppDisconnected(view_id); | 352 tracker()->OnEmbeddedAppDisconnected(view_id); |
353 } | 353 } |
354 void OnUnembed() override { tracker()->OnUnembed(); } | 354 void OnUnembed() override { tracker()->OnUnembed(); } |
| 355 void OnResourcesReturned( |
| 356 mojo::Array<mojo::ReturnedResourcePtr> resources) override { |
| 357 } |
355 void OnViewBoundsChanged(Id view_id, | 358 void OnViewBoundsChanged(Id view_id, |
356 RectPtr old_bounds, | 359 RectPtr old_bounds, |
357 RectPtr new_bounds) override { | 360 RectPtr new_bounds) override { |
358 // The bounds of the root may change during startup on Android at random | 361 // The bounds of the root may change during startup on Android at random |
359 // times. As this doesn't matter, and shouldn't impact test exepctations, | 362 // times. As this doesn't matter, and shouldn't impact test exepctations, |
360 // it is ignored. | 363 // it is ignored. |
361 if (view_id == root_view_id_) | 364 if (view_id == root_view_id_) |
362 return; | 365 return; |
363 tracker()->OnViewBoundsChanged(view_id, old_bounds.Pass(), | 366 tracker()->OnViewBoundsChanged(view_id, old_bounds.Pass(), |
364 new_bounds.Pass()); | 367 new_bounds.Pass()); |
(...skipping 1389 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1754 // TODO(sky): need to better track changes to initial connection. For example, | 1757 // TODO(sky): need to better track changes to initial connection. For example, |
1755 // that SetBounsdViews/AddView and the like don't result in messages to the | 1758 // that SetBounsdViews/AddView and the like don't result in messages to the |
1756 // originating connection. | 1759 // originating connection. |
1757 | 1760 |
1758 // TODO(sky): make sure coverage of what was | 1761 // TODO(sky): make sure coverage of what was |
1759 // ViewManagerTest.SecondEmbedRoot_InitService and | 1762 // ViewManagerTest.SecondEmbedRoot_InitService and |
1760 // ViewManagerTest.MultipleEmbedRootsBeforeWTHReady gets added to window manager | 1763 // ViewManagerTest.MultipleEmbedRootsBeforeWTHReady gets added to window manager |
1761 // tests. | 1764 // tests. |
1762 | 1765 |
1763 } // namespace view_manager | 1766 } // namespace view_manager |
OLD | NEW |