Chromium Code Reviews| 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) |