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 "services/ui/public/cpp/tests/window_server_test_base.h" | 5 #include "services/ui/public/cpp/tests/window_server_test_base.h" |
6 | 6 |
7 #include "base/bind.h" | 7 #include "base/bind.h" |
8 #include "base/location.h" | 8 #include "base/location.h" |
9 #include "base/run_loop.h" | 9 #include "base/run_loop.h" |
10 #include "base/single_thread_task_runner.h" | 10 #include "base/single_thread_task_runner.h" |
(...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
83 most_recent_client_ = root->window_tree(); | 83 most_recent_client_ = root->window_tree(); |
84 EXPECT_TRUE(QuitRunLoop()); | 84 EXPECT_TRUE(QuitRunLoop()); |
85 ASSERT_TRUE(window_manager_client_); | 85 ASSERT_TRUE(window_manager_client_); |
86 window_manager_client_->AddActivationParent(root); | 86 window_manager_client_->AddActivationParent(root); |
87 } | 87 } |
88 | 88 |
89 void WindowServerTestBase::OnDidDestroyClient(WindowTreeClient* client) { | 89 void WindowServerTestBase::OnDidDestroyClient(WindowTreeClient* client) { |
90 window_tree_client_destroyed_ = true; | 90 window_tree_client_destroyed_ = true; |
91 } | 91 } |
92 | 92 |
93 void WindowServerTestBase::OnEventObserved(const ui::Event& event, | 93 void WindowServerTestBase::OnPointerEventObserved(const ui::PointerEvent& event, |
94 Window* target) {} | 94 Window* target) {} |
95 | 95 |
96 void WindowServerTestBase::SetWindowManagerClient(WindowManagerClient* client) { | 96 void WindowServerTestBase::SetWindowManagerClient(WindowManagerClient* client) { |
97 window_manager_client_ = client; | 97 window_manager_client_ = client; |
98 } | 98 } |
99 | 99 |
100 bool WindowServerTestBase::OnWmSetBounds(Window* window, gfx::Rect* bounds) { | 100 bool WindowServerTestBase::OnWmSetBounds(Window* window, gfx::Rect* bounds) { |
101 return window_manager_delegate_ | 101 return window_manager_delegate_ |
102 ? window_manager_delegate_->OnWmSetBounds(window, bounds) | 102 ? window_manager_delegate_->OnWmSetBounds(window, bounds) |
103 : true; | 103 : true; |
104 } | 104 } |
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
154 ? window_manager_delegate_->OnAccelerator(accelerator_id, event) | 154 ? window_manager_delegate_->OnAccelerator(accelerator_id, event) |
155 : mojom::EventResult::UNHANDLED; | 155 : mojom::EventResult::UNHANDLED; |
156 } | 156 } |
157 | 157 |
158 void WindowServerTestBase::Create(const shell::Identity& remote_identity, | 158 void WindowServerTestBase::Create(const shell::Identity& remote_identity, |
159 mojom::WindowTreeClientRequest request) { | 159 mojom::WindowTreeClientRequest request) { |
160 new WindowTreeClient(this, nullptr, std::move(request)); | 160 new WindowTreeClient(this, nullptr, std::move(request)); |
161 } | 161 } |
162 | 162 |
163 } // namespace ui | 163 } // namespace ui |
OLD | NEW |