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

Unified Diff: components/mus/ws/test_utils.cc

Issue 1939133002: StructTraits to map mus::mojom::Event to unique_ptr<ui::Event> (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Addressed feedback. Created 4 years, 6 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « components/mus/ws/test_utils.h ('k') | components/mus/ws/window_manager_state_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/mus/ws/test_utils.cc
diff --git a/components/mus/ws/test_utils.cc b/components/mus/ws/test_utils.cc
index b0cb1f6264d17122c19ebaa74bdf8b8568d9f69f..bf2d2022f06e5a5390ba051d61d85df9f4431c86 100644
--- a/components/mus/ws/test_utils.cc
+++ b/components/mus/ws/test_utils.cc
@@ -161,7 +161,8 @@ void TestWindowManager::WmCreateTopLevelWindow(
void TestWindowManager::WmClientJankinessChanged(ClientSpecificId client_id,
bool janky) {}
-void TestWindowManager::OnAccelerator(uint32_t id, mojom::EventPtr event) {
+void TestWindowManager::OnAccelerator(uint32_t id,
+ std::unique_ptr<ui::Event> event) {
on_accelerator_called_ = true;
on_accelerator_id_ = id;
}
@@ -268,14 +269,14 @@ void TestWindowTreeClient::OnWindowSharedPropertyChanged(
void TestWindowTreeClient::OnWindowInputEvent(uint32_t event_id,
uint32_t window,
- mojom::EventPtr event,
+ std::unique_ptr<ui::Event> event,
uint32_t event_observer_id) {
- tracker_.OnWindowInputEvent(window, std::move(event), event_observer_id);
+ tracker_.OnWindowInputEvent(window, *event.get(), event_observer_id);
}
-void TestWindowTreeClient::OnEventObserved(mojom::EventPtr event,
+void TestWindowTreeClient::OnEventObserved(std::unique_ptr<ui::Event> event,
uint32_t event_observer_id) {
- tracker_.OnEventObserved(std::move(event), event_observer_id);
+ tracker_.OnEventObserved(*event.get(), event_observer_id);
}
void TestWindowTreeClient::OnWindowFocused(uint32_t focused_window_id) {
« no previous file with comments | « components/mus/ws/test_utils.h ('k') | components/mus/ws/window_manager_state_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698