| OLD | NEW |
| 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/x11_desktop_window_move_client.h" | 5 #include "ui/views/widget/desktop_aura/x11_desktop_window_move_client.h" |
| 6 | 6 |
| 7 #include <X11/Xlib.h> | 7 #include <X11/Xlib.h> |
| 8 | 8 |
| 9 #include "base/debug/stack_trace.h" | 9 #include "base/debug/stack_trace.h" |
| 10 #include "base/message_loop/message_loop.h" | 10 #include "base/message_loop/message_loop.h" |
| 11 #include "base/run_loop.h" | 11 #include "base/run_loop.h" |
| 12 #include "ui/aura/env.h" | 12 #include "ui/aura/env.h" |
| 13 #include "ui/aura/window.h" | 13 #include "ui/aura/window.h" |
| 14 #include "ui/aura/window_tree_host.h" | 14 #include "ui/aura/window_tree_host.h" |
| 15 #include "ui/base/x/x11_util.h" | 15 #include "ui/base/x/x11_util.h" |
| 16 #include "ui/events/event.h" | 16 #include "ui/events/event.h" |
| 17 #include "ui/gfx/screen.h" | |
| 18 | 17 |
| 19 namespace views { | 18 namespace views { |
| 20 | 19 |
| 21 X11DesktopWindowMoveClient::X11DesktopWindowMoveClient() | 20 X11DesktopWindowMoveClient::X11DesktopWindowMoveClient() |
| 22 : move_loop_(this), | 21 : move_loop_(this), |
| 23 host_(NULL) { | 22 host_(NULL) { |
| 24 } | 23 } |
| 25 | 24 |
| 26 X11DesktopWindowMoveClient::~X11DesktopWindowMoveClient() {} | 25 X11DesktopWindowMoveClient::~X11DesktopWindowMoveClient() {} |
| 27 | 26 |
| (...skipping 26 matching lines...) Expand all Loading... |
| 54 source->SetCapture(); | 53 source->SetCapture(); |
| 55 bool success = move_loop_.RunMoveLoop(source, host_->last_cursor()); | 54 bool success = move_loop_.RunMoveLoop(source, host_->last_cursor()); |
| 56 return success ? aura::client::MOVE_SUCCESSFUL : aura::client::MOVE_CANCELED; | 55 return success ? aura::client::MOVE_SUCCESSFUL : aura::client::MOVE_CANCELED; |
| 57 } | 56 } |
| 58 | 57 |
| 59 void X11DesktopWindowMoveClient::EndMoveLoop() { | 58 void X11DesktopWindowMoveClient::EndMoveLoop() { |
| 60 move_loop_.EndMoveLoop(); | 59 move_loop_.EndMoveLoop(); |
| 61 } | 60 } |
| 62 | 61 |
| 63 } // namespace views | 62 } // namespace views |
| OLD | NEW |