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

Side by Side Diff: ui/views/widget/desktop_aura/desktop_screen_win.cc

Issue 1825723002: Move ScreenWin to ui/display (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Added is_chromeos guard Created 4 years, 8 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 (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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/views/widget/desktop_aura/desktop_screen_win.h" 5 #include "ui/views/widget/desktop_aura/desktop_screen_win.h"
6 6
7 #include "base/logging.h" 7 #include "base/logging.h"
8 #include "ui/aura/window.h" 8 #include "ui/aura/window.h"
9 #include "ui/aura/window_event_dispatcher.h" 9 #include "ui/aura/window_event_dispatcher.h"
10 #include "ui/aura/window_tree_host.h" 10 #include "ui/aura/window_tree_host.h"
11 #include "ui/gfx/display.h" 11 #include "ui/gfx/display.h"
12 #include "ui/views/widget/desktop_aura/desktop_screen.h" 12 #include "ui/views/widget/desktop_aura/desktop_screen.h"
13 #include "ui/views/widget/desktop_aura/desktop_window_tree_host_win.h" 13 #include "ui/views/widget/desktop_aura/desktop_window_tree_host_win.h"
14 14
15 namespace views { 15 namespace views {
16 16
17 //////////////////////////////////////////////////////////////////////////////// 17 ////////////////////////////////////////////////////////////////////////////////
18 // DesktopScreenWin, public: 18 // DesktopScreenWin, public:
19 19
20 DesktopScreenWin::DesktopScreenWin() { 20 DesktopScreenWin::DesktopScreenWin() {
21 } 21 }
22 22
23 DesktopScreenWin::~DesktopScreenWin() { 23 DesktopScreenWin::~DesktopScreenWin() {
24 } 24 }
25 25
26 //////////////////////////////////////////////////////////////////////////////// 26 ////////////////////////////////////////////////////////////////////////////////
27 // DesktopScreenWin, gfx::ScreenWin implementation: 27 // DesktopScreenWin, display::win::ScreenWin implementation:
28 28
29 gfx::Display DesktopScreenWin::GetDisplayMatching( 29 gfx::Display DesktopScreenWin::GetDisplayMatching(
30 const gfx::Rect& match_rect) const { 30 const gfx::Rect& match_rect) const {
31 return GetDisplayNearestPoint(match_rect.CenterPoint()); 31 return GetDisplayNearestPoint(match_rect.CenterPoint());
32 } 32 }
33 33
34 HWND DesktopScreenWin::GetHWNDFromNativeView(gfx::NativeView window) const { 34 HWND DesktopScreenWin::GetHWNDFromNativeView(gfx::NativeView window) const {
35 aura::WindowTreeHost* host = window->GetHost(); 35 aura::WindowTreeHost* host = window->GetHost();
36 return host ? host->GetAcceleratedWidget() : NULL; 36 return host ? host->GetAcceleratedWidget() : NULL;
37 } 37 }
38 38
39 gfx::NativeWindow DesktopScreenWin::GetNativeWindowFromHWND(HWND hwnd) const { 39 gfx::NativeWindow DesktopScreenWin::GetNativeWindowFromHWND(HWND hwnd) const {
40 return (::IsWindow(hwnd)) ? 40 return (::IsWindow(hwnd)) ?
41 DesktopWindowTreeHostWin::GetContentWindowForHWND(hwnd) : NULL; 41 DesktopWindowTreeHostWin::GetContentWindowForHWND(hwnd) : NULL;
42 } 42 }
43 43
44 //////////////////////////////////////////////////////////////////////////////// 44 ////////////////////////////////////////////////////////////////////////////////
45 45
46 gfx::Screen* CreateDesktopScreen() { 46 gfx::Screen* CreateDesktopScreen() {
47 return new DesktopScreenWin; 47 return new DesktopScreenWin;
48 } 48 }
49 49
50 } // namespace views 50 } // namespace views
OLDNEW
« testing/buildbot/chromium.fyi.json ('K') | « ui/views/widget/desktop_aura/desktop_screen_win.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698