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

Side by Side Diff: chrome/browser/ui/views/tabs/window_finder_x11.cc

Issue 1920263003: Rename gfx::Display/Screen to display::Display/Screen in chrome (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 7 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 "chrome/browser/ui/views/tabs/window_finder.h" 5 #include "chrome/browser/ui/views/tabs/window_finder.h"
6 6
7 #include "ui/display/screen.h"
7 #include "ui/gfx/geometry/point_conversions.h" 8 #include "ui/gfx/geometry/point_conversions.h"
8 #include "ui/gfx/screen.h"
9 #include "ui/views/widget/desktop_aura/x11_topmost_window_finder.h" 9 #include "ui/views/widget/desktop_aura/x11_topmost_window_finder.h"
10 10
11 namespace { 11 namespace {
12 12
13 float GetDeviceScaleFactor() { 13 float GetDeviceScaleFactor() {
14 return gfx::Screen::GetScreen()->GetPrimaryDisplay().device_scale_factor(); 14 return display::Screen::GetScreen()
15 ->GetPrimaryDisplay()
16 .device_scale_factor();
15 } 17 }
16 18
17 gfx::Point DIPToPixelPoint(const gfx::Point& dip_point) { 19 gfx::Point DIPToPixelPoint(const gfx::Point& dip_point) {
18 return gfx::ScaleToFlooredPoint(dip_point, GetDeviceScaleFactor()); 20 return gfx::ScaleToFlooredPoint(dip_point, GetDeviceScaleFactor());
19 } 21 }
20 22
21 } // anonymous namespace 23 } // anonymous namespace
22 24
23 gfx::NativeWindow WindowFinder::GetLocalProcessWindowAtPoint( 25 gfx::NativeWindow WindowFinder::GetLocalProcessWindowAtPoint(
24 const gfx::Point& screen_point, 26 const gfx::Point& screen_point,
25 const std::set<gfx::NativeWindow>& ignore) { 27 const std::set<gfx::NativeWindow>& ignore) {
26 // The X11 server is the canonical state of what the window stacking order 28 // The X11 server is the canonical state of what the window stacking order
27 // is. 29 // is.
28 views::X11TopmostWindowFinder finder; 30 views::X11TopmostWindowFinder finder;
29 return finder.FindLocalProcessWindowAt(DIPToPixelPoint(screen_point), ignore); 31 return finder.FindLocalProcessWindowAt(DIPToPixelPoint(screen_point), ignore);
30 } 32 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/views/tabs/window_finder_win.cc ('k') | chrome/browser/ui/views/toolbar/toolbar_button.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698