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

Side by Side Diff: ui/views/test/ui_controls_factory_desktop_aurax11.cc

Issue 2691393002: Fix auto raw pointer deduction on linux (Closed)
Patch Set: rebase Created 3 years, 10 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 unified diff | Download patch
« no previous file with comments | « ui/views/layout/grid_layout.cc ('k') | url/origin_unittest.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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 <X11/keysym.h> 5 #include <X11/keysym.h>
6 #include <X11/Xlib.h> 6 #include <X11/Xlib.h>
7 7
8 // X macro fail. 8 // X macro fail.
9 #if defined(RootWindow) 9 #if defined(RootWindow)
10 #undef RootWindow 10 #undef RootWindow
(...skipping 128 matching lines...) Expand 10 before | Expand all | Expand 10 after
139 if (screen_position_client) { 139 if (screen_position_client) {
140 screen_position_client->ConvertPointFromScreen(root_window, 140 screen_position_client->ConvertPointFromScreen(root_window,
141 &root_location); 141 &root_location);
142 } 142 }
143 143
144 aura::WindowTreeHost* host = root_window->GetHost(); 144 aura::WindowTreeHost* host = root_window->GetHost();
145 gfx::Point root_current_location = 145 gfx::Point root_current_location =
146 aura::test::QueryLatestMousePositionRequestInHost(host); 146 aura::test::QueryLatestMousePositionRequestInHost(host);
147 host->ConvertPixelsToDIP(&root_current_location); 147 host->ConvertPixelsToDIP(&root_current_location);
148 148
149 auto screen = views::test::TestDesktopScreenX11::GetInstance(); 149 auto* screen = views::test::TestDesktopScreenX11::GetInstance();
150 DCHECK_EQ(screen, display::Screen::GetScreen()); 150 DCHECK_EQ(screen, display::Screen::GetScreen());
151 screen->set_cursor_screen_point(gfx::Point(screen_x, screen_y)); 151 screen->set_cursor_screen_point(gfx::Point(screen_x, screen_y));
152 152
153 if (root_location != root_current_location && button_down_mask == 0) { 153 if (root_location != root_current_location && button_down_mask == 0) {
154 // Move the cursor because EnterNotify/LeaveNotify are generated with the 154 // Move the cursor because EnterNotify/LeaveNotify are generated with the
155 // current mouse position as a result of XGrabPointer() 155 // current mouse position as a result of XGrabPointer()
156 root_window->MoveCursorTo(root_location); 156 root_window->MoveCursorTo(root_location);
157 } else { 157 } else {
158 XEvent xevent = {0}; 158 XEvent xevent = {0};
159 XMotionEvent* xmotion = &xevent.xmotion; 159 XMotionEvent* xmotion = &xevent.xmotion;
(...skipping 125 matching lines...) Expand 10 before | Expand all | Expand 10 after
285 285
286 UIControlsAura* CreateUIControlsDesktopAura() { 286 UIControlsAura* CreateUIControlsDesktopAura() {
287 // The constructor of UIControlsDesktopX11 needs X11 connection to be 287 // The constructor of UIControlsDesktopX11 needs X11 connection to be
288 // initialized. 288 // initialized.
289 gfx::InitializeThreadedX11(); 289 gfx::InitializeThreadedX11();
290 return new UIControlsDesktopX11(); 290 return new UIControlsDesktopX11();
291 } 291 }
292 292
293 } // namespace test 293 } // namespace test
294 } // namespace views 294 } // namespace views
OLDNEW
« no previous file with comments | « ui/views/layout/grid_layout.cc ('k') | url/origin_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698