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

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

Issue 196383014: Remove window/host accessors from WED; IWYU for WTH (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 side-by-side diff with in-line comments
Download patch
Index: ui/views/widget/desktop_aura/x11_desktop_window_move_client.cc
diff --git a/ui/views/widget/desktop_aura/x11_desktop_window_move_client.cc b/ui/views/widget/desktop_aura/x11_desktop_window_move_client.cc
index 072d1ef792d2b956089943957a600726c131f883..482986b9f3f3d38fa4c0298c929cea1f677da07a 100644
--- a/ui/views/widget/desktop_aura/x11_desktop_window_move_client.cc
+++ b/ui/views/widget/desktop_aura/x11_desktop_window_move_client.cc
@@ -12,7 +12,7 @@
#include "base/run_loop.h"
#include "ui/aura/env.h"
#include "ui/aura/window.h"
-#include "ui/aura/window_event_dispatcher.h"
+#include "ui/aura/window_tree_host.h"
#include "ui/base/x/x11_util.h"
#include "ui/events/event.h"
#include "ui/gfx/screen.h"
@@ -41,7 +41,7 @@ namespace views {
X11DesktopWindowMoveClient::X11DesktopWindowMoveClient()
: move_loop_(this),
- dispatcher_(NULL) {
+ host_(NULL) {
}
X11DesktopWindowMoveClient::~X11DesktopWindowMoveClient() {}
@@ -50,7 +50,7 @@ void X11DesktopWindowMoveClient::OnMouseMovement(XMotionEvent* event) {
gfx::Point cursor_point(event->x_root, event->y_root);
gfx::Point system_loc = cursor_point - window_offset_;
- gfx::Rect target_rect(system_loc, dispatcher_->host()->GetBounds().size());
+ gfx::Rect target_rect(system_loc, host_->GetBounds().size());
window_move_timer_.Start(
FROM_HERE,
@@ -65,7 +65,7 @@ void X11DesktopWindowMoveClient::OnMouseReleased() {
}
void X11DesktopWindowMoveClient::OnMoveLoopEnded() {
- dispatcher_ = NULL;
+ host_ = NULL;
}
////////////////////////////////////////////////////////////////////////////////
@@ -76,10 +76,9 @@ aura::client::WindowMoveResult X11DesktopWindowMoveClient::RunMoveLoop(
const gfx::Vector2d& drag_offset,
aura::client::WindowMoveSource move_source) {
window_offset_ = drag_offset;
- dispatcher_ = source->GetHost()->dispatcher();
+ host_ = source->GetHost();
- bool success = move_loop_.RunMoveLoop(source,
- dispatcher_->host()->last_cursor());
+ bool success = move_loop_.RunMoveLoop(source, host_->last_cursor());
return success ? aura::client::MOVE_SUCCESSFUL : aura::client::MOVE_CANCELED;
}
@@ -92,7 +91,7 @@ void X11DesktopWindowMoveClient::EndMoveLoop() {
// DesktopWindowTreeHostLinux, private:
void X11DesktopWindowMoveClient::SetHostBounds(const gfx::Rect& rect) {
- dispatcher_->host()->SetBounds(rect);
+ host_->SetBounds(rect);
}
} // namespace views
« no previous file with comments | « ui/views/widget/desktop_aura/x11_desktop_window_move_client.h ('k') | ui/views/widget/desktop_aura/x11_window_event_filter.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698