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

Side by Side Diff: ui/ozone/platform/drm/host/drm_window_host.cc

Issue 2519993002: Move kInvalidDisplayID to display_constants.h. (Closed)
Patch Set: Address comments. Created 4 years 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 unified diff | Download patch
« no previous file with comments | « ui/message_center/views/desktop_popup_alignment_delegate.cc ('k') | ui/views/mus/screen_mus.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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
OLDNEW
« no previous file with comments | « ui/message_center/views/desktop_popup_alignment_delegate.cc ('k') | ui/views/mus/screen_mus.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698