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

Side by Side Diff: ash/host/ash_window_tree_host_x11.cc

Issue 1608733002: Remove ui/gfx/screen_type_delegate.h (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@metro-mode-4
Patch Set: and another rebase Created 4 years, 11 months 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
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 "ash/host/ash_window_tree_host_x11.h" 5 #include "ash/host/ash_window_tree_host_x11.h"
6 6
7 #include <X11/Xatom.h> 7 #include <X11/Xatom.h>
8 #include <X11/Xlib.h> 8 #include <X11/Xlib.h>
9 #include <X11/extensions/XInput2.h> 9 #include <X11/extensions/XInput2.h>
10 #include <X11/extensions/Xfixes.h> 10 #include <X11/extensions/Xfixes.h>
(...skipping 200 matching lines...) Expand 10 before | Expand all | Expand 10 after
211 xiev->deviceid); 211 xiev->deviceid);
212 // If we don't have record of display id for this touch device, check 212 // If we don't have record of display id for this touch device, check
213 // that if the event is within the bound of the root window. Note 213 // that if the event is within the bound of the root window. Note
214 // that in multi-monitor case, the event position is in framebuffer 214 // that in multi-monitor case, the event position is in framebuffer
215 // space so the bounds check will not work so well. 215 // space so the bounds check will not work so well.
216 if (touch_display_id == gfx::Display::kInvalidDisplayID) { 216 if (touch_display_id == gfx::Display::kInvalidDisplayID) {
217 if (base::SysInfo::IsRunningOnChromeOS() && 217 if (base::SysInfo::IsRunningOnChromeOS() &&
218 !bounds().Contains(ui::EventLocationFromNative(xev))) 218 !bounds().Contains(ui::EventLocationFromNative(xev)))
219 return false; 219 return false;
220 } else { 220 } else {
221 gfx::Screen* screen = gfx::Screen::GetScreenFor(window()); 221 gfx::Screen* screen = gfx::Screen::GetScreen();
222 gfx::Display display = screen->GetDisplayNearestWindow(window()); 222 gfx::Display display = screen->GetDisplayNearestWindow(window());
223 return touch_display_id == display.id(); 223 return touch_display_id == display.id();
224 } 224 }
225 #endif // defined(OS_CHROMEOS) 225 #endif // defined(OS_CHROMEOS)
226 return true; 226 return true;
227 } 227 }
228 default: 228 default:
229 return true; 229 return true;
230 } 230 }
231 } 231 }
(...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after
291 #endif 291 #endif
292 292
293 AshWindowTreeHost* AshWindowTreeHost::Create( 293 AshWindowTreeHost* AshWindowTreeHost::Create(
294 const AshWindowTreeHostInitParams& init_params) { 294 const AshWindowTreeHostInitParams& init_params) {
295 if (init_params.offscreen) 295 if (init_params.offscreen)
296 return new AshWindowTreeHostUnified(init_params.initial_bounds); 296 return new AshWindowTreeHostUnified(init_params.initial_bounds);
297 return new AshWindowTreeHostX11(init_params.initial_bounds); 297 return new AshWindowTreeHostX11(init_params.initial_bounds);
298 } 298 }
299 299
300 } // namespace ash 300 } // namespace ash
OLDNEW
« no previous file with comments | « ash/display/unified_mouse_warp_controller_unittest.cc ('k') | ash/magnifier/magnification_controller_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698