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 <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 81 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
92 void OnViewSharedPropertyChanged(uint32_t view, | 92 void OnViewSharedPropertyChanged(uint32_t view, |
93 const String& name, | 93 const String& name, |
94 Array<uint8_t> new_data) override { | 94 Array<uint8_t> new_data) override { |
95 tracker_.OnViewSharedPropertyChanged(view, name, new_data.Pass()); | 95 tracker_.OnViewSharedPropertyChanged(view, name, new_data.Pass()); |
96 } | 96 } |
97 void OnViewInputEvent(uint32_t view, | 97 void OnViewInputEvent(uint32_t view, |
98 mojo::EventPtr event, | 98 mojo::EventPtr event, |
99 const mojo::Callback<void()>& callback) override { | 99 const mojo::Callback<void()>& callback) override { |
100 tracker_.OnViewInputEvent(view, event.Pass()); | 100 tracker_.OnViewInputEvent(view, event.Pass()); |
101 } | 101 } |
| 102 void OnPerformAction(uint32_t view_id, |
| 103 const String& name, |
| 104 const mojo::Callback<void(bool)>& callback) override {} |
102 | 105 |
103 TestChangeTracker tracker_; | 106 TestChangeTracker tracker_; |
104 | 107 |
105 DISALLOW_COPY_AND_ASSIGN(TestViewManagerClient); | 108 DISALLOW_COPY_AND_ASSIGN(TestViewManagerClient); |
106 }; | 109 }; |
107 | 110 |
108 // ----------------------------------------------------------------------------- | 111 // ----------------------------------------------------------------------------- |
109 | 112 |
110 // ClientConnection implementation that vends TestViewManagerClient. | 113 // ClientConnection implementation that vends TestViewManagerClient. |
111 class TestClientConnection : public ClientConnection { | 114 class TestClientConnection : public ClientConnection { |
(...skipping 347 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
459 const ServerView* cloned_view = GetFirstCloned(v1->parent()); | 462 const ServerView* cloned_view = GetFirstCloned(v1->parent()); |
460 ASSERT_TRUE(cloned_view); | 463 ASSERT_TRUE(cloned_view); |
461 // |cloned_view| should have a child and its child should have a child. | 464 // |cloned_view| should have a child and its child should have a child. |
462 ASSERT_EQ(1u, cloned_view->GetChildren().size()); | 465 ASSERT_EQ(1u, cloned_view->GetChildren().size()); |
463 const ServerView* cloned_view_child = cloned_view->GetChildren()[0]; | 466 const ServerView* cloned_view_child = cloned_view->GetChildren()[0]; |
464 EXPECT_EQ(1u, cloned_view_child->GetChildren().size()); | 467 EXPECT_EQ(1u, cloned_view_child->GetChildren().size()); |
465 EXPECT_TRUE(cloned_view_child->id() == ClonedViewId()); | 468 EXPECT_TRUE(cloned_view_child->id() == ClonedViewId()); |
466 } | 469 } |
467 | 470 |
468 } // namespace view_manager | 471 } // namespace view_manager |
OLD | NEW |