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

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

Issue 184903003: Window ownership -> WindowTreeHost (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: . Created 6 years, 9 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 | 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/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"
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after
47 bool DesktopScreenWin::IsDIPEnabled() { 47 bool DesktopScreenWin::IsDIPEnabled() {
48 return true; 48 return true;
49 } 49 }
50 50
51 gfx::Display DesktopScreenWin::GetDisplayMatching( 51 gfx::Display DesktopScreenWin::GetDisplayMatching(
52 const gfx::Rect& match_rect) const { 52 const gfx::Rect& match_rect) const {
53 return GetDisplayNearestPoint(match_rect.CenterPoint()); 53 return GetDisplayNearestPoint(match_rect.CenterPoint());
54 } 54 }
55 55
56 HWND DesktopScreenWin::GetHWNDFromNativeView(gfx::NativeView window) const { 56 HWND DesktopScreenWin::GetHWNDFromNativeView(gfx::NativeView window) const {
57 aura::WindowEventDispatcher* dispatcher = window->GetDispatcher(); 57 aura::WindowTreeHost* host = window->GetHost();
58 return dispatcher ? dispatcher->host()->GetAcceleratedWidget() : NULL; 58 return host ? host->GetAcceleratedWidget() : NULL;
59 } 59 }
60 60
61 gfx::NativeWindow DesktopScreenWin::GetNativeWindowFromHWND(HWND hwnd) const { 61 gfx::NativeWindow DesktopScreenWin::GetNativeWindowFromHWND(HWND hwnd) const {
62 return (::IsWindow(hwnd)) ? 62 return (::IsWindow(hwnd)) ?
63 DesktopWindowTreeHostWin::GetContentWindowForHWND(hwnd) : NULL; 63 DesktopWindowTreeHostWin::GetContentWindowForHWND(hwnd) : NULL;
64 } 64 }
65 65
66 //////////////////////////////////////////////////////////////////////////////// 66 ////////////////////////////////////////////////////////////////////////////////
67 67
68 gfx::Screen* CreateDesktopScreen() { 68 gfx::Screen* CreateDesktopScreen() {
69 return new DesktopScreenWin; 69 return new DesktopScreenWin;
70 } 70 }
71 71
72 } // namespace views 72 } // 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