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

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

Issue 2712963003: mustash: Use ui::chromeos::EventRewriter in mus (Closed)
Patch Set: Fix compile issues Created 3 years, 10 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_unittest.cc » ('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 b3981b86032061140d6c25279a890a940e863eab..8af3f7eb1354140d5d3178787f9eff0a8e7266e4 100644
--- a/services/ui/ws/display.cc
+++ b/services/ui/ws/display.cc
@@ -264,6 +264,32 @@ void Display::CreateRootWindow(const gfx::Size& size) {
focus_controller_->AddObserver(this);
}
+bool Display::CanDispatchToTarget(EventTarget* target) {
+ NOTREACHED();
+ return true;
+}
+
+ui::EventTarget* Display::GetRootForEvent(ui::Event* event) {
+ NOTREACHED();
+ return nullptr;
+}
+
+ui::EventTargeter* Display::GetDefaultEventTargeter() {
+ NOTREACHED();
sadrul 2017/02/24 15:59:54 These should have proper implementations.
Peng 2017/02/28 16:47:30 I did little research and found out it is not easy
sky 2017/02/28 17:54:26 It feels a bit hacky to try to use parts of event
Peng 2017/02/28 18:14:29 We can let PlatformDisplayDefault to implement the
+ return nullptr;
+}
+
+ui::EventDispatchDetails Display::OnEventFromSource(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();
+ return ui::EventDispatchDetails();
+}
+
display::Display Display::GetDisplay() {
return ToDisplay();
}
@@ -272,6 +298,10 @@ ServerWindow* Display::GetRootWindow() {
return root_.get();
}
+ui::EventProcessor* Display::GetEventProcessor() {
+ return this;
+}
+
void Display::OnAcceleratedWidgetAvailable() {
display_manager()->OnDisplayAcceleratedWidgetAvailable(this);
InitWindowManagerDisplayRoots();
@@ -281,16 +311,6 @@ bool Display::IsInHighContrastMode() {
return window_server_->IsActiveUserInHighContrastMode();
}
-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)
« no previous file with comments | « services/ui/ws/display.h ('k') | services/ui/ws/display_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698