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

Side by Side Diff: ui/aura/root_window_host_linux.cc

Issue 10441028: aura/cros: Rename MessagePump{X => AuraX11} and move the atom cache into it. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix compile error in file added in the interim Created 8 years, 6 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 | Annotate | Revision Log
« no previous file with comments | « ui/aura/monitor_change_observer_x11.cc ('k') | ui/aura/ui_controls_x11.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 (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/aura/root_window_host_linux.h" 5 #include "ui/aura/root_window_host_linux.h"
6 6
7 #include <X11/Xatom.h> 7 #include <X11/Xatom.h>
8 #include <X11/Xcursor/Xcursor.h> 8 #include <X11/Xcursor/Xcursor.h>
9 #include <X11/Xlib.h> 9 #include <X11/Xlib.h>
10 #include <X11/cursorfont.h> 10 #include <X11/cursorfont.h>
11 #include <X11/extensions/XInput2.h> 11 #include <X11/extensions/XInput2.h>
12 #include <X11/extensions/Xfixes.h> 12 #include <X11/extensions/Xfixes.h>
13 #include <X11/extensions/Xrandr.h> 13 #include <X11/extensions/Xrandr.h>
14 #include <algorithm> 14 #include <algorithm>
15 15
16 #include "base/message_pump_x.h" 16 #include "base/message_pump_aurax11.h"
17 #include "base/stl_util.h" 17 #include "base/stl_util.h"
18 #include "base/stringprintf.h" 18 #include "base/stringprintf.h"
19 #include "grit/ui_resources_standard.h" 19 #include "grit/ui_resources_standard.h"
20 #include "third_party/skia/include/core/SkBitmap.h" 20 #include "third_party/skia/include/core/SkBitmap.h"
21 #include "ui/aura/client/user_gesture_client.h" 21 #include "ui/aura/client/user_gesture_client.h"
22 #include "ui/aura/dispatcher_linux.h" 22 #include "ui/aura/dispatcher_linux.h"
23 #include "ui/aura/env.h" 23 #include "ui/aura/env.h"
24 #include "ui/aura/event.h" 24 #include "ui/aura/event.h"
25 #include "ui/aura/root_window.h" 25 #include "ui/aura/root_window.h"
26 #include "ui/base/cursor/cursor.h" 26 #include "ui/base/cursor/cursor.h"
(...skipping 358 matching lines...) Expand 10 before | Expand all | Expand 10 after
385 // A map to hold all image cursors. It maps the cursor ID to the X Cursor. 385 // A map to hold all image cursors. It maps the cursor ID to the X Cursor.
386 std::map<int, Cursor> cursors_; 386 std::map<int, Cursor> cursors_;
387 387
388 float scale_factor_; 388 float scale_factor_;
389 389
390 DISALLOW_COPY_AND_ASSIGN(ImageCursors); 390 DISALLOW_COPY_AND_ASSIGN(ImageCursors);
391 }; 391 };
392 392
393 RootWindowHostLinux::RootWindowHostLinux(const gfx::Rect& bounds) 393 RootWindowHostLinux::RootWindowHostLinux(const gfx::Rect& bounds)
394 : root_window_(NULL), 394 : root_window_(NULL),
395 xdisplay_(base::MessagePumpX::GetDefaultXDisplay()), 395 xdisplay_(base::MessagePumpAuraX11::GetDefaultXDisplay()),
396 xwindow_(0), 396 xwindow_(0),
397 x_root_window_(DefaultRootWindow(xdisplay_)), 397 x_root_window_(DefaultRootWindow(xdisplay_)),
398 current_cursor_(ui::kCursorNull), 398 current_cursor_(ui::kCursorNull),
399 cursor_shown_(true), 399 cursor_shown_(true),
400 bounds_(bounds), 400 bounds_(bounds),
401 focus_when_shown_(false), 401 focus_when_shown_(false),
402 pointer_barriers_(NULL), 402 pointer_barriers_(NULL),
403 image_cursors_(new ImageCursors), 403 image_cursors_(new ImageCursors),
404 atom_cache_(xdisplay_, kAtomsToCache) { 404 atom_cache_(xdisplay_, kAtomsToCache) {
405 XSetWindowAttributes swa; 405 XSetWindowAttributes swa;
(...skipping 549 matching lines...) Expand 10 before | Expand all | Expand 10 after
955 955
956 // static 956 // static
957 RootWindowHost* RootWindowHost::GetForAcceleratedWidget( 957 RootWindowHost* RootWindowHost::GetForAcceleratedWidget(
958 gfx::AcceleratedWidget accelerated_widget) { 958 gfx::AcceleratedWidget accelerated_widget) {
959 return reinterpret_cast<RootWindowHost*>( 959 return reinterpret_cast<RootWindowHost*>(
960 ui::ViewProp::GetValue(accelerated_widget, kRootWindowHostLinuxKey)); 960 ui::ViewProp::GetValue(accelerated_widget, kRootWindowHostLinuxKey));
961 } 961 }
962 962
963 // static 963 // static
964 gfx::Size RootWindowHost::GetNativeScreenSize() { 964 gfx::Size RootWindowHost::GetNativeScreenSize() {
965 ::Display* xdisplay = base::MessagePumpX::GetDefaultXDisplay(); 965 ::Display* xdisplay = base::MessagePumpAuraX11::GetDefaultXDisplay();
966 return gfx::Size(DisplayWidth(xdisplay, 0), DisplayHeight(xdisplay, 0)); 966 return gfx::Size(DisplayWidth(xdisplay, 0), DisplayHeight(xdisplay, 0));
967 } 967 }
968 968
969 } // namespace aura 969 } // namespace aura
OLDNEW
« no previous file with comments | « ui/aura/monitor_change_observer_x11.cc ('k') | ui/aura/ui_controls_x11.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698