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 113 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
124 if (window_manager_delegate_) | 124 if (window_manager_delegate_) |
125 window_manager_delegate_->OnWmClientJankinessChanged(client_windows, janky); | 125 window_manager_delegate_->OnWmClientJankinessChanged(client_windows, janky); |
126 } | 126 } |
127 | 127 |
128 void WindowServerTestBase::OnWmNewDisplay(Window* window, | 128 void WindowServerTestBase::OnWmNewDisplay(Window* window, |
129 const display::Display& display) { | 129 const display::Display& display) { |
130 if (window_manager_delegate_) | 130 if (window_manager_delegate_) |
131 window_manager_delegate_->OnWmNewDisplay(window, display); | 131 window_manager_delegate_->OnWmNewDisplay(window, display); |
132 } | 132 } |
133 | 133 |
134 void WindowServerTestBase::OnAccelerator(uint32_t id, const ui::Event& event) { | 134 mojom::EventResult WindowServerTestBase::OnAccelerator(uint32_t accelerator_id, |
135 if (window_manager_delegate_) | 135 const ui::Event& event) { |
136 window_manager_delegate_->OnAccelerator(id, event); | 136 return window_manager_delegate_ |
| 137 ? window_manager_delegate_->OnAccelerator(accelerator_id, event) |
| 138 : mojom::EventResult::UNHANDLED; |
137 } | 139 } |
138 | 140 |
139 void WindowServerTestBase::Create(shell::Connection* connection, | 141 void WindowServerTestBase::Create(shell::Connection* connection, |
140 mojom::WindowTreeClientRequest request) { | 142 mojom::WindowTreeClientRequest request) { |
141 new WindowTreeClient(this, nullptr, std::move(request)); | 143 new WindowTreeClient(this, nullptr, std::move(request)); |
142 } | 144 } |
143 | 145 |
144 } // namespace ui | 146 } // namespace ui |
OLD | NEW |