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

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

Issue 37733003: Make GetRootWindow() return a Window instead of a RootWindow. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 7 years, 1 month 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 | Annotate | Revision Log
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/root_window.h" 8 #include "ui/aura/root_window.h"
9 #include "ui/aura/root_window_host.h" 9 #include "ui/aura/root_window_host.h"
10 #include "ui/gfx/display.h" 10 #include "ui/gfx/display.h"
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after
46 bool DesktopScreenWin::IsDIPEnabled() { 46 bool DesktopScreenWin::IsDIPEnabled() {
47 return true; 47 return true;
48 } 48 }
49 49
50 gfx::Display DesktopScreenWin::GetDisplayMatching( 50 gfx::Display DesktopScreenWin::GetDisplayMatching(
51 const gfx::Rect& match_rect) const { 51 const gfx::Rect& match_rect) const {
52 return GetDisplayNearestPoint(match_rect.CenterPoint()); 52 return GetDisplayNearestPoint(match_rect.CenterPoint());
53 } 53 }
54 54
55 HWND DesktopScreenWin::GetHWNDFromNativeView(gfx::NativeView window) const { 55 HWND DesktopScreenWin::GetHWNDFromNativeView(gfx::NativeView window) const {
56 aura::RootWindow* root_window = window->GetRootWindow(); 56 aura::WindowEventDispatcher* dispatcher = window->GetDispatcher();
57 return root_window ? root_window->GetAcceleratedWidget() : NULL; 57 return dispatcher ? dispatcher->GetAcceleratedWidget() : NULL;
58 } 58 }
59 59
60 gfx::NativeWindow DesktopScreenWin::GetNativeWindowFromHWND(HWND hwnd) const { 60 gfx::NativeWindow DesktopScreenWin::GetNativeWindowFromHWND(HWND hwnd) const {
61 return (::IsWindow(hwnd)) ? 61 return (::IsWindow(hwnd)) ?
62 DesktopRootWindowHostWin::GetContentWindowForHWND(hwnd) : NULL; 62 DesktopRootWindowHostWin::GetContentWindowForHWND(hwnd) : NULL;
63 } 63 }
64 64
65 //////////////////////////////////////////////////////////////////////////////// 65 ////////////////////////////////////////////////////////////////////////////////
66 66
67 gfx::Screen* CreateDesktopScreen() { 67 gfx::Screen* CreateDesktopScreen() {
68 return new DesktopScreenWin; 68 return new DesktopScreenWin;
69 } 69 }
70 70
71 } // namespace views 71 } // namespace views
OLDNEW
« no previous file with comments | « ui/views/widget/desktop_aura/desktop_screen_position_client.cc ('k') | ui/views/widget/desktop_aura/desktop_screen_x11.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698