| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 "ui/ozone/platform/dri/dri_window.h" | 5 #include "ui/ozone/platform/dri/dri_window.h" |
| 6 | 6 |
| 7 #include "base/bind.h" | 7 #include "base/bind.h" |
| 8 #include "ui/events/event.h" | 8 #include "ui/events/event.h" |
| 9 #include "ui/events/ozone/evdev/event_factory_evdev.h" | 9 #include "ui/events/ozone/evdev/event_factory_evdev.h" |
| 10 #include "ui/events/ozone/events_ozone.h" | 10 #include "ui/events/ozone/events_ozone.h" |
| (...skipping 87 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 98 DCHECK(ne); | 98 DCHECK(ne); |
| 99 Event* event = static_cast<Event*>(ne); | 99 Event* event = static_cast<Event*>(ne); |
| 100 if (event->IsMouseEvent() || event->IsScrollEvent()) | 100 if (event->IsMouseEvent() || event->IsScrollEvent()) |
| 101 return window_manager_->cursor()->GetCursorWindow() == widget_; | 101 return window_manager_->cursor()->GetCursorWindow() == widget_; |
| 102 | 102 |
| 103 return true; | 103 return true; |
| 104 } | 104 } |
| 105 | 105 |
| 106 uint32_t DriWindow::DispatchEvent(const PlatformEvent& native_event) { | 106 uint32_t DriWindow::DispatchEvent(const PlatformEvent& native_event) { |
| 107 DispatchEventFromNativeUiEvent( | 107 DispatchEventFromNativeUiEvent( |
| 108 native_event, | 108 native_event, base::Bind(&PlatformWindowDelegate::DispatchEvent, |
| 109 base::Bind(&PlatformWindowDelegate::DispatchEvent, | 109 base::Unretained(delegate_))); |
| 110 base::Unretained(delegate_))); | |
| 111 return POST_DISPATCH_STOP_PROPAGATION; | 110 return POST_DISPATCH_STOP_PROPAGATION; |
| 112 } | 111 } |
| 113 | 112 |
| 114 void DriWindow::OnChannelEstablished() { | 113 void DriWindow::OnChannelEstablished() { |
| 115 sender_->Send(new OzoneGpuMsg_CreateWindowDelegate(widget_)); | 114 sender_->Send(new OzoneGpuMsg_CreateWindowDelegate(widget_)); |
| 116 sender_->Send(new OzoneGpuMsg_WindowBoundsChanged(widget_, bounds_)); | 115 sender_->Send(new OzoneGpuMsg_WindowBoundsChanged(widget_, bounds_)); |
| 117 } | 116 } |
| 118 | 117 |
| 119 void DriWindow::OnChannelDestroyed() { | 118 void DriWindow::OnChannelDestroyed() { |
| 120 } | 119 } |
| 121 | 120 |
| 122 } // namespace ui | 121 } // namespace ui |
| OLD | NEW |