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

Side by Side Diff: services/view_manager/view_manager_service_unittest.cc

Issue 880743002: Plumb ViewportMetrics change notifications around the world and back. (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Fix typo Created 5 years, 10 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
« no previous file with comments | « services/view_manager/view_manager_service_impl.cc ('k') | sky/viewer/document_view.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 <string> 5 #include <string>
6 #include <vector> 6 #include <vector>
7 7
8 #include "base/message_loop/message_loop.h" 8 #include "base/message_loop/message_loop.h"
9 #include "mojo/converters/geometry/geometry_type_converters.h" 9 #include "mojo/converters/geometry/geometry_type_converters.h"
10 #include "mojo/public/interfaces/application/service_provider.mojom.h" 10 #include "mojo/public/interfaces/application/service_provider.mojom.h"
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after
57 tracker_.OnEmbed(connection_id, embedder_url, root.Pass()); 57 tracker_.OnEmbed(connection_id, embedder_url, root.Pass());
58 } 58 }
59 void OnEmbeddedAppDisconnected(uint32_t view) override { 59 void OnEmbeddedAppDisconnected(uint32_t view) override {
60 tracker_.OnEmbeddedAppDisconnected(view); 60 tracker_.OnEmbeddedAppDisconnected(view);
61 } 61 }
62 void OnViewBoundsChanged(uint32_t view, 62 void OnViewBoundsChanged(uint32_t view,
63 mojo::RectPtr old_bounds, 63 mojo::RectPtr old_bounds,
64 mojo::RectPtr new_bounds) override { 64 mojo::RectPtr new_bounds) override {
65 tracker_.OnViewBoundsChanged(view, old_bounds.Pass(), new_bounds.Pass()); 65 tracker_.OnViewBoundsChanged(view, old_bounds.Pass(), new_bounds.Pass());
66 } 66 }
67 void OnViewViewportMetricsChanged(
68 mojo::ViewportMetricsPtr old_metrics,
69 mojo::ViewportMetricsPtr new_metrics) override {
70 tracker_.OnViewViewportMetricsChanged(old_metrics.Pass(),
71 new_metrics.Pass());
72 }
67 void OnViewHierarchyChanged(uint32_t view, 73 void OnViewHierarchyChanged(uint32_t view,
68 uint32_t new_parent, 74 uint32_t new_parent,
69 uint32_t old_parent, 75 uint32_t old_parent,
70 Array<ViewDataPtr> views) override { 76 Array<ViewDataPtr> views) override {
71 tracker_.OnViewHierarchyChanged(view, new_parent, old_parent, views.Pass()); 77 tracker_.OnViewHierarchyChanged(view, new_parent, old_parent, views.Pass());
72 } 78 }
73 void OnViewReordered(uint32_t view_id, 79 void OnViewReordered(uint32_t view_id,
74 uint32_t relative_view_id, 80 uint32_t relative_view_id,
75 mojo::OrderDirection direction) override { 81 mojo::OrderDirection direction) override {
76 tracker_.OnViewReordered(view_id, relative_view_id, direction); 82 tracker_.OnViewReordered(view_id, relative_view_id, direction);
(...skipping 364 matching lines...) Expand 10 before | Expand all | Expand 10 after
441 const ServerView* cloned_view = GetFirstCloned(v1->parent()); 447 const ServerView* cloned_view = GetFirstCloned(v1->parent());
442 ASSERT_TRUE(cloned_view); 448 ASSERT_TRUE(cloned_view);
443 // |cloned_view| should have a child and its child should have a child. 449 // |cloned_view| should have a child and its child should have a child.
444 ASSERT_EQ(1u, cloned_view->GetChildren().size()); 450 ASSERT_EQ(1u, cloned_view->GetChildren().size());
445 const ServerView* cloned_view_child = cloned_view->GetChildren()[0]; 451 const ServerView* cloned_view_child = cloned_view->GetChildren()[0];
446 EXPECT_EQ(1u, cloned_view_child->GetChildren().size()); 452 EXPECT_EQ(1u, cloned_view_child->GetChildren().size());
447 EXPECT_TRUE(cloned_view_child->id() == ClonedViewId()); 453 EXPECT_TRUE(cloned_view_child->id() == ClonedViewId());
448 } 454 }
449 455
450 } // namespace view_manager 456 } // namespace view_manager
OLDNEW
« no previous file with comments | « services/view_manager/view_manager_service_impl.cc ('k') | sky/viewer/document_view.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698