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

Unified Diff: services/ui/ws/display.cc

Issue 2712963003: mustash: Use ui::chromeos::EventRewriter in mus (Closed)
Patch Set: Fix build issues. Created 3 years, 9 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 | « services/ui/ws/display.h ('k') | services/ui/ws/display_manager.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: services/ui/ws/display.cc
diff --git a/services/ui/ws/display.cc b/services/ui/ws/display.cc
index f5e24873334cd08ba139170a515a254f94b5dbe4..e9e8242af062e942c752e731dc2dfc5f96071e3e 100644
--- a/services/ui/ws/display.cc
+++ b/services/ui/ws/display.cc
@@ -260,21 +260,15 @@ ServerWindow* Display::GetRootWindow() {
return root_.get();
}
+EventSink* Display::GetEventSink() {
+ return this;
+}
+
void Display::OnAcceleratedWidgetAvailable() {
display_manager()->OnDisplayAcceleratedWidgetAvailable(this);
InitWindowManagerDisplayRoots();
}
-void Display::OnEvent(const ui::Event& event) {
- WindowManagerDisplayRoot* display_root = GetActiveWindowManagerDisplayRoot();
- if (display_root)
- display_root->window_manager_state()->ProcessEvent(event, GetId());
- window_server_
- ->GetUserActivityMonitorForUser(
- window_server_->user_id_tracker()->active_id())
- ->OnUserActivity();
-}
-
void Display::OnNativeCaptureLost() {
WindowManagerDisplayRoot* display_root = GetActiveWindowManagerDisplayRoot();
if (display_root)
@@ -382,5 +376,19 @@ void Display::OnWindowManagerWindowTreeFactoryReady(
CreateWindowManagerDisplayRootFromFactory(factory);
}
+EventDispatchDetails Display::OnEventFromSource(Event* event) {
+ WindowManagerDisplayRoot* display_root = GetActiveWindowManagerDisplayRoot();
+ if (display_root) {
+ WindowManagerState* wm_state = display_root->window_manager_state();
+ wm_state->ProcessEvent(*event, GetId());
+ }
+
+ UserActivityMonitor* activity_monitor =
+ window_server_->GetUserActivityMonitorForUser(
+ window_server_->user_id_tracker()->active_id());
+ activity_monitor->OnUserActivity();
+ return EventDispatchDetails();
+}
+
} // namespace ws
} // namespace ui
« no previous file with comments | « services/ui/ws/display.h ('k') | services/ui/ws/display_manager.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698