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

Unified Diff: ui/views/widget/desktop_aura/desktop_window_tree_host_x11.cc

Issue 184903003: Window ownership -> WindowTreeHost (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: . Created 6 years, 10 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 side-by-side diff with in-line comments
Download patch
Index: ui/views/widget/desktop_aura/desktop_window_tree_host_x11.cc
diff --git a/ui/views/widget/desktop_aura/desktop_window_tree_host_x11.cc b/ui/views/widget/desktop_aura/desktop_window_tree_host_x11.cc
index 9cbe5124c660adc493fd16b6ccc294f3ee4b4639..785a816130c4433d865d350e7dd480b285929dbc 100644
--- a/ui/views/widget/desktop_aura/desktop_window_tree_host_x11.cc
+++ b/ui/views/widget/desktop_aura/desktop_window_tree_host_x11.cc
@@ -154,18 +154,16 @@ DesktopWindowTreeHostX11::~DesktopWindowTreeHostX11() {
// static
aura::Window* DesktopWindowTreeHostX11::GetContentWindowForXID(XID xid) {
- aura::WindowEventDispatcher* dispatcher =
- aura::WindowEventDispatcher::GetForAcceleratedWidget(xid);
- return dispatcher ?
- dispatcher->window()->GetProperty(kViewsWindowForRootWindow) : NULL;
+ aura::WindowTreeHost* host =
+ aura::WindowTreeHost::GetForAcceleratedWidget(xid);
+ return host ? host->window()->GetProperty(kViewsWindowForRootWindow) : NULL;
}
// static
DesktopWindowTreeHostX11* DesktopWindowTreeHostX11::GetHostForXID(XID xid) {
- aura::WindowEventDispatcher* dispatcher =
- aura::WindowEventDispatcher::GetForAcceleratedWidget(xid);
- return dispatcher ?
- dispatcher->window()->GetProperty(kHostForRootWindow) : NULL;
+ aura::WindowTreeHost* host =
+ aura::WindowTreeHost::GetForAcceleratedWidget(xid);
+ return host ? host->window()->GetProperty(kHostForRootWindow) : NULL;
}
// static
@@ -839,7 +837,7 @@ void DesktopWindowTreeHostX11::ReleaseCapture() {
bool DesktopWindowTreeHostX11::QueryMouseLocation(
gfx::Point* location_return) {
aura::client::CursorClient* cursor_client =
- aura::client::GetCursorClient(GetDispatcher()->window());
+ aura::client::GetCursorClient(window());
if (cursor_client && !cursor_client->IsMouseEventsEnabled()) {
*location_return = gfx::Point(0, 0);
return false;
@@ -1078,9 +1076,9 @@ void DesktopWindowTreeHostX11::InitX11Window(
// If we have a parent, record the parent/child relationship. We use this
// data during destruction to make sure that when we try to close a parent
// window, we also destroy all child windows.
- if (params.parent && params.parent->GetDispatcher()) {
+ if (params.parent && params.parent->GetHost()) {
XID parent_xid =
- params.parent->GetDispatcher()->host()->GetAcceleratedWidget();
+ params.parent->GetHost()->GetAcceleratedWidget();
window_parent_ = GetHostForXID(parent_xid);
DCHECK(window_parent_);
window_parent_->window_children_.insert(this);

Powered by Google App Engine
This is Rietveld 408576698