| 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 127 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 138 | 138 |
| 139 if (event->IsTouchEvent()) { | 139 if (event->IsTouchEvent()) { |
| 140 // Dispatch the event if it is from the touchscreen associated with the | 140 // Dispatch the event if it is from the touchscreen associated with the |
| 141 // DrmWindowHost. We cannot check the event's location because if the | 141 // DrmWindowHost. We cannot check the event's location because if the |
| 142 // touchscreen has a bezel, touches in the bezel have a location outside of | 142 // touchscreen has a bezel, touches in the bezel have a location outside of |
| 143 // |bounds_|. | 143 // |bounds_|. |
| 144 int64_t display_id = | 144 int64_t display_id = |
| 145 DeviceDataManager::GetInstance()->GetTargetDisplayForTouchDevice( | 145 DeviceDataManager::GetInstance()->GetTargetDisplayForTouchDevice( |
| 146 event->source_device_id()); | 146 event->source_device_id()); |
| 147 | 147 |
| 148 if (display_id == display::Display::kInvalidDisplayID) | 148 if (display_id == display::kInvalidDisplayId) |
| 149 return false; | 149 return false; |
| 150 | 150 |
| 151 DrmDisplayHost* display = display_manager_->GetDisplay(display_id); | 151 DrmDisplayHost* display = display_manager_->GetDisplay(display_id); |
| 152 if (!display) | 152 if (!display) |
| 153 return false; | 153 return false; |
| 154 | 154 |
| 155 DisplaySnapshot* snapshot = display->snapshot(); | 155 DisplaySnapshot* snapshot = display->snapshot(); |
| 156 if (!snapshot->current_mode()) | 156 if (!snapshot->current_mode()) |
| 157 return false; | 157 return false; |
| 158 | 158 |
| (...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 198 void DrmWindowHost::SendBoundsChange() { | 198 void DrmWindowHost::SendBoundsChange() { |
| 199 // 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 |
| 200 // window bounds when the window size shrinks. | 200 // window bounds when the window size shrinks. |
| 201 cursor_->CommitBoundsChange(widget_, bounds_, GetCursorConfinedBounds()); | 201 cursor_->CommitBoundsChange(widget_, bounds_, GetCursorConfinedBounds()); |
| 202 sender_->GpuWindowBoundsChanged(widget_, bounds_); | 202 sender_->GpuWindowBoundsChanged(widget_, bounds_); |
| 203 | 203 |
| 204 overlay_manager_->ResetCache(); | 204 overlay_manager_->ResetCache(); |
| 205 } | 205 } |
| 206 | 206 |
| 207 } // namespace ui | 207 } // namespace ui |
| OLD | NEW |