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

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

Issue 56053005: linux_aura: Improve window drag performance. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase to ToT 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 side-by-side diff with in-line comments
Download patch
Index: ui/views/widget/desktop_aura/x11_desktop_window_move_client.h
diff --git a/ui/views/widget/desktop_aura/x11_desktop_window_move_client.h b/ui/views/widget/desktop_aura/x11_desktop_window_move_client.h
index 1a8b5884ac13ac1c52b7e2a09b111117be3d3dc2..3be6a63c3257afe0c21890dec07fb0ab33b5f6b9 100644
--- a/ui/views/widget/desktop_aura/x11_desktop_window_move_client.h
+++ b/ui/views/widget/desktop_aura/x11_desktop_window_move_client.h
@@ -13,6 +13,7 @@
#include "base/callback.h"
#include "base/compiler_specific.h"
#include "base/message_loop/message_loop.h"
+#include "base/timer/timer.h"
#include "ui/aura/client/window_move_client.h"
#include "ui/gfx/point.h"
#include "ui/views/views_export.h"
@@ -23,6 +24,10 @@ namespace aura {
class RootWindow;
}
+namespace gfx {
+class Rect;
+}
+
namespace views {
// When we're dragging tabs, we need to manually position our window.
@@ -46,6 +51,9 @@ class VIEWS_EXPORT X11DesktopWindowMoveClient :
virtual void EndMoveLoop() OVERRIDE;
private:
+ // Callback from |window_move_timer_|.
+ void SetHostBounds(const gfx::Rect& rect);
+
X11WholeScreenMoveLoop move_loop_;
// We need to keep track of this so we can actually move it when reacting to
@@ -56,6 +64,8 @@ class VIEWS_EXPORT X11DesktopWindowMoveClient :
// started. Used to calculate the window's new bounds relative to the current
// location of the cursor.
gfx::Vector2d window_offset_;
+
+ base::OneShotTimer<X11DesktopWindowMoveClient> window_move_timer_;
};
} // namespace views
« no previous file with comments | « ui/views/widget/desktop_aura/desktop_screen_x11.cc ('k') | ui/views/widget/desktop_aura/x11_desktop_window_move_client.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698