| 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/drm/host/drm_window_host.h" | 5 #include "ui/ozone/platform/drm/host/drm_window_host.h" |
| 6 | 6 |
| 7 #include "base/bind.h" | 7 #include "base/bind.h" |
| 8 #include "ui/display/display.h" | 8 #include "ui/display/display.h" |
| 9 #include "ui/events/devices/device_data_manager.h" | 9 #include "ui/events/devices/device_data_manager.h" |
| 10 #include "ui/events/event.h" | 10 #include "ui/events/event.h" |
| (...skipping 168 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 179 location -= gfx::Vector2dF(bounds_.OffsetFromOrigin()); | 179 location -= gfx::Vector2dF(bounds_.OffsetFromOrigin()); |
| 180 located_event->set_location_f(location); | 180 located_event->set_location_f(location); |
| 181 located_event->set_root_location_f(location); | 181 located_event->set_root_location_f(location); |
| 182 } | 182 } |
| 183 DispatchEventFromNativeUiEvent( | 183 DispatchEventFromNativeUiEvent( |
| 184 native_event, base::Bind(&PlatformWindowDelegate::DispatchEvent, | 184 native_event, base::Bind(&PlatformWindowDelegate::DispatchEvent, |
| 185 base::Unretained(delegate_))); | 185 base::Unretained(delegate_))); |
| 186 return POST_DISPATCH_STOP_PROPAGATION; | 186 return POST_DISPATCH_STOP_PROPAGATION; |
| 187 } | 187 } |
| 188 | 188 |
| 189 void DrmWindowHost::OnGpuProcessLaunched() {} |
| 190 |
| 189 void DrmWindowHost::OnGpuThreadReady() { | 191 void DrmWindowHost::OnGpuThreadReady() { |
| 190 sender_->GpuCreateWindow(widget_); | 192 sender_->GpuCreateWindow(widget_); |
| 191 SendBoundsChange(); | 193 SendBoundsChange(); |
| 192 } | 194 } |
| 193 | 195 |
| 194 void DrmWindowHost::OnGpuThreadRetired() {} | 196 void DrmWindowHost::OnGpuThreadRetired() {} |
| 195 | 197 |
| 196 void DrmWindowHost::SendBoundsChange() { | 198 void DrmWindowHost::SendBoundsChange() { |
| 197 // Update the cursor before the window so that the cursor stays within the | 199 // Update the cursor before the window so that the cursor stays within the |
| 198 // window bounds when the window size shrinks. | 200 // window bounds when the window size shrinks. |
| 199 cursor_->CommitBoundsChange(widget_, bounds_, GetCursorConfinedBounds()); | 201 cursor_->CommitBoundsChange(widget_, bounds_, GetCursorConfinedBounds()); |
| 200 sender_->GpuWindowBoundsChanged(widget_, bounds_); | 202 sender_->GpuWindowBoundsChanged(widget_, bounds_); |
| 201 | 203 |
| 202 overlay_manager_->ResetCache(); | 204 overlay_manager_->ResetCache(); |
| 203 } | 205 } |
| 204 | 206 |
| 205 } // namespace ui | 207 } // namespace ui |
| OLD | NEW |