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

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

Issue 2524873002: Rename WindowTreeHost G|SetBounds to indicate they are in pixels. (Closed)
Patch Set: rebase Created 4 years 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
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 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"
(...skipping 10 matching lines...) Expand all
21 : move_loop_(this), 21 : move_loop_(this),
22 host_(NULL) { 22 host_(NULL) {
23 } 23 }
24 24
25 X11DesktopWindowMoveClient::~X11DesktopWindowMoveClient() {} 25 X11DesktopWindowMoveClient::~X11DesktopWindowMoveClient() {}
26 26
27 void X11DesktopWindowMoveClient::OnMouseMovement(const gfx::Point& screen_point, 27 void X11DesktopWindowMoveClient::OnMouseMovement(const gfx::Point& screen_point,
28 int flags, 28 int flags,
29 base::TimeTicks event_time) { 29 base::TimeTicks event_time) {
30 gfx::Point system_loc = screen_point - window_offset_; 30 gfx::Point system_loc = screen_point - window_offset_;
31 host_->SetBounds(gfx::Rect(system_loc, host_->GetBounds().size())); 31 host_->SetBoundsInPixels(
32 gfx::Rect(system_loc, host_->GetBoundsInPixels().size()));
32 } 33 }
33 34
34 void X11DesktopWindowMoveClient::OnMouseReleased() { 35 void X11DesktopWindowMoveClient::OnMouseReleased() {
35 EndMoveLoop(); 36 EndMoveLoop();
36 } 37 }
37 38
38 void X11DesktopWindowMoveClient::OnMoveLoopEnded() { 39 void X11DesktopWindowMoveClient::OnMoveLoopEnded() {
39 host_ = NULL; 40 host_ = NULL;
40 } 41 }
41 42
(...skipping 10 matching lines...) Expand all
52 source->SetCapture(); 53 source->SetCapture();
53 bool success = move_loop_.RunMoveLoop(source, host_->last_cursor()); 54 bool success = move_loop_.RunMoveLoop(source, host_->last_cursor());
54 return success ? aura::client::MOVE_SUCCESSFUL : aura::client::MOVE_CANCELED; 55 return success ? aura::client::MOVE_SUCCESSFUL : aura::client::MOVE_CANCELED;
55 } 56 }
56 57
57 void X11DesktopWindowMoveClient::EndMoveLoop() { 58 void X11DesktopWindowMoveClient::EndMoveLoop() {
58 move_loop_.EndMoveLoop(); 59 move_loop_.EndMoveLoop();
59 } 60 }
60 61
61 } // namespace views 62 } // namespace views
OLDNEW
« no previous file with comments | « ui/views/widget/desktop_aura/desktop_window_tree_host_x11.cc ('k') | ui/views/widget/native_widget_aura_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698