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

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

Issue 72503002: Remove some pass-thrus on RootWindow API in favor of exposing the RootWindowHost again. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: . 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 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/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 // Get rid of a macro from Xlib.h that conflicts with Aura's RootWindow class. 8 // Get rid of a macro from Xlib.h that conflicts with Aura's RootWindow class.
9 #undef RootWindow 9 #undef RootWindow
10 10
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after
45 : move_loop_(this), 45 : move_loop_(this),
46 root_window_(NULL) { 46 root_window_(NULL) {
47 } 47 }
48 48
49 X11DesktopWindowMoveClient::~X11DesktopWindowMoveClient() {} 49 X11DesktopWindowMoveClient::~X11DesktopWindowMoveClient() {}
50 50
51 void X11DesktopWindowMoveClient::OnMouseMovement(XMotionEvent* event) { 51 void X11DesktopWindowMoveClient::OnMouseMovement(XMotionEvent* event) {
52 gfx::Point cursor_point(event->x_root, event->y_root); 52 gfx::Point cursor_point(event->x_root, event->y_root);
53 gfx::Point system_loc = cursor_point - window_offset_; 53 gfx::Point system_loc = cursor_point - window_offset_;
54 54
55 gfx::Rect target_rect(system_loc, root_window_->GetHostSize()); 55 gfx::Rect target_rect(system_loc, root_window_->host()->GetBounds().size());
56 56
57 window_move_timer_.Start( 57 window_move_timer_.Start(
58 FROM_HERE, 58 FROM_HERE,
59 base::TimeDelta::FromMilliseconds(kMoveDelay), 59 base::TimeDelta::FromMilliseconds(kMoveDelay),
60 base::Bind(&X11DesktopWindowMoveClient::SetHostBounds, 60 base::Bind(&X11DesktopWindowMoveClient::SetHostBounds,
61 base::Unretained(this), 61 base::Unretained(this),
62 target_rect)); 62 target_rect));
63 } 63 }
64 64
65 void X11DesktopWindowMoveClient::OnMouseReleased() { 65 void X11DesktopWindowMoveClient::OnMouseReleased() {
(...skipping 24 matching lines...) Expand all
90 } 90 }
91 91
92 //////////////////////////////////////////////////////////////////////////////// 92 ////////////////////////////////////////////////////////////////////////////////
93 // DesktopRootWindowHostLinux, private: 93 // DesktopRootWindowHostLinux, private:
94 94
95 void X11DesktopWindowMoveClient::SetHostBounds(const gfx::Rect& rect) { 95 void X11DesktopWindowMoveClient::SetHostBounds(const gfx::Rect& rect) {
96 root_window_->SetHostBounds(rect); 96 root_window_->SetHostBounds(rect);
97 } 97 }
98 98
99 } // namespace views 99 } // namespace views
OLDNEW
« no previous file with comments | « ui/views/widget/desktop_aura/desktop_screen_x11.cc ('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