OLD | NEW |
1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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 "components/view_manager/public/cpp/tests/view_manager_test_base.h" | 5 #include "components/view_manager/public/cpp/tests/view_manager_test_base.h" |
6 | 6 |
7 #include "base/bind.h" | 7 #include "base/bind.h" |
8 #include "base/message_loop/message_loop.h" | 8 #include "base/message_loop/message_loop.h" |
9 #include "base/run_loop.h" | 9 #include "base/run_loop.h" |
10 #include "base/test/test_timeouts.h" | 10 #include "base/test/test_timeouts.h" |
(...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
75 view_manager_init_.reset(); // Uses application_impl() from base class. | 75 view_manager_init_.reset(); // Uses application_impl() from base class. |
76 ApplicationTestBase::TearDown(); | 76 ApplicationTestBase::TearDown(); |
77 } | 77 } |
78 | 78 |
79 ApplicationDelegate* ViewManagerTestBase::GetApplicationDelegate() { | 79 ApplicationDelegate* ViewManagerTestBase::GetApplicationDelegate() { |
80 return this; | 80 return this; |
81 } | 81 } |
82 | 82 |
83 bool ViewManagerTestBase::ConfigureIncomingConnection( | 83 bool ViewManagerTestBase::ConfigureIncomingConnection( |
84 ApplicationConnection* connection) { | 84 ApplicationConnection* connection) { |
85 connection->AddService<ViewManagerClient>(this); | 85 connection->AddService<ViewTreeClient>(this); |
86 return true; | 86 return true; |
87 } | 87 } |
88 | 88 |
89 void ViewManagerTestBase::OnEmbed(View* root) { | 89 void ViewManagerTestBase::OnEmbed(View* root) { |
90 most_recent_view_manager_ = root->view_manager(); | 90 most_recent_view_manager_ = root->view_manager(); |
91 EXPECT_TRUE(QuitRunLoop()); | 91 EXPECT_TRUE(QuitRunLoop()); |
92 } | 92 } |
93 | 93 |
94 void ViewManagerTestBase::OnViewManagerDestroyed(ViewManager* view_manager) { | 94 void ViewManagerTestBase::OnViewManagerDestroyed(ViewManager* view_manager) { |
95 view_manager_destroyed_ = true; | 95 view_manager_destroyed_ = true; |
96 } | 96 } |
97 | 97 |
98 void ViewManagerTestBase::Create(ApplicationConnection* connection, | 98 void ViewManagerTestBase::Create(ApplicationConnection* connection, |
99 InterfaceRequest<ViewManagerClient> request) { | 99 InterfaceRequest<ViewTreeClient> request) { |
100 ViewManager::Create(this, request.Pass()); | 100 ViewManager::Create(this, request.Pass()); |
101 } | 101 } |
102 | 102 |
103 } // namespace mojo | 103 } // namespace mojo |
OLD | NEW |