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

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

Issue 1915363002: Rename gfx::Display/Screen to display::Display/Screen in views/wm (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: more cleanups Created 4 years, 7 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
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 212 matching lines...) Expand 10 before | Expand all | Expand 10 after
223 marker_event->xclient.window = x_window_; 223 marker_event->xclient.window = x_window_;
224 marker_event->xclient.format = 8; 224 marker_event->xclient.format = 8;
225 } 225 }
226 marker_event->xclient.message_type = MarkerEventAtom(); 226 marker_event->xclient.message_type = MarkerEventAtom();
227 XSendEvent(x_display_, x_window_, False, 0, marker_event); 227 XSendEvent(x_display_, x_window_, False, 0, marker_event);
228 ui::PlatformEventWaiter::Create(closure, base::Bind(&Matcher)); 228 ui::PlatformEventWaiter::Create(closure, base::Bind(&Matcher));
229 } 229 }
230 private: 230 private:
231 aura::Window* RootWindowForPoint(const gfx::Point& point) { 231 aura::Window* RootWindowForPoint(const gfx::Point& point) {
232 // Most interactive_ui_tests run inside of the aura_test_helper 232 // Most interactive_ui_tests run inside of the aura_test_helper
233 // environment. This means that we can't rely on gfx::Screen and several 233 // environment. This means that we can't rely on display::Screen and several
234 // other things to work properly. Therefore we hack around this by 234 // other things to work properly. Therefore we hack around this by
235 // iterating across the windows owned DesktopWindowTreeHostX11 since this 235 // iterating across the windows owned DesktopWindowTreeHostX11 since this
236 // doesn't rely on having a DesktopScreenX11. 236 // doesn't rely on having a DesktopScreenX11.
237 std::vector<aura::Window*> windows = 237 std::vector<aura::Window*> windows =
238 DesktopWindowTreeHostX11::GetAllOpenWindows(); 238 DesktopWindowTreeHostX11::GetAllOpenWindows();
239 for (std::vector<aura::Window*>::const_iterator it = windows.begin(); 239 for (std::vector<aura::Window*>::const_iterator it = windows.begin();
240 it != windows.end(); ++it) { 240 it != windows.end(); ++it) {
241 if ((*it)->GetBoundsInScreen().Contains(point)) { 241 if ((*it)->GetBoundsInScreen().Contains(point)) {
242 return (*it)->GetRootWindow(); 242 return (*it)->GetRootWindow();
243 } 243 }
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after
280 280
281 UIControlsAura* CreateUIControlsDesktopAura() { 281 UIControlsAura* CreateUIControlsDesktopAura() {
282 // The constructor of UIControlsDesktopX11 needs X11 connection to be 282 // The constructor of UIControlsDesktopX11 needs X11 connection to be
283 // initialized. 283 // initialized.
284 gfx::InitializeThreadedX11(); 284 gfx::InitializeThreadedX11();
285 return new UIControlsDesktopX11(); 285 return new UIControlsDesktopX11();
286 } 286 }
287 287
288 } // namespace test 288 } // namespace test
289 } // namespace views 289 } // namespace views
OLDNEW
« no previous file with comments | « ui/views/test/desktop_screen_x11_test_api.cc ('k') | ui/views/touchui/touch_selection_controller_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698