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

Side by Side Diff: ui/base/x/events_aurax11.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: Created 8 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 | 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/base/events.h" 5 #include "ui/base/events.h"
6 6
7 #include <X11/Xlib.h> 7 #include <X11/Xlib.h>
8 #include <X11/extensions/XInput.h> 8 #include <X11/extensions/XInput.h>
9 #include <X11/extensions/XInput2.h> 9 #include <X11/extensions/XInput2.h>
10 #include <string.h> 10 #include <string.h>
11 11
12 #include "base/command_line.h" 12 #include "base/command_line.h"
13 #include "base/logging.h" 13 #include "base/logging.h"
14 #include "base/message_pump_x.h" 14 #include "base/message_pump_aurax11.h"
15 #include "ui/base/keycodes/keyboard_code_conversion_x.h" 15 #include "ui/base/keycodes/keyboard_code_conversion_x.h"
16 #include "ui/base/ui_base_switches.h" 16 #include "ui/base/ui_base_switches.h"
17 #include "ui/base/touch/touch_factory.h" 17 #include "ui/base/touch/touch_factory.h"
18 #include "ui/base/x/x11_util.h" 18 #include "ui/base/x/x11_util.h"
19 #include "ui/gfx/point.h" 19 #include "ui/gfx/point.h"
20 #include "ui/gfx/monitor.h" 20 #include "ui/gfx/monitor.h"
21 #include "ui/gfx/rect.h" 21 #include "ui/gfx/rect.h"
22 #include "ui/gfx/screen.h" 22 #include "ui/gfx/screen.h"
23 23
24 // Copied from xserver-properties.h 24 // Copied from xserver-properties.h
(...skipping 527 matching lines...) Expand 10 before | Expand all | Expand 10 after
552 552
553 float GetTouchParamFromXEvent(XEvent* xev, 553 float GetTouchParamFromXEvent(XEvent* xev,
554 ui::TouchFactory::TouchParam tp, 554 ui::TouchFactory::TouchParam tp,
555 float default_value) { 555 float default_value) {
556 ui::TouchFactory::GetInstance()->ExtractTouchParam(*xev, tp, &default_value); 556 ui::TouchFactory::GetInstance()->ExtractTouchParam(*xev, tp, &default_value);
557 return default_value; 557 return default_value;
558 } 558 }
559 559
560 Atom GetNoopEventAtom() { 560 Atom GetNoopEventAtom() {
561 return XInternAtom( 561 return XInternAtom(
562 base::MessagePumpX::GetDefaultXDisplay(), 562 base::MessagePumpAuraX11::GetDefaultXDisplay(),
563 "noop", False); 563 "noop", False);
564 } 564 }
565 565
566 #if defined(USE_XI2_MT) 566 #if defined(USE_XI2_MT)
567 gfx::Point CalibrateTouchCoordinates( 567 gfx::Point CalibrateTouchCoordinates(
568 const XIDeviceEvent* xievent) { 568 const XIDeviceEvent* xievent) {
569 int x = static_cast<int>(xievent->event_x); 569 int x = static_cast<int>(xievent->event_x);
570 int y = static_cast<int>(xievent->event_y); 570 int y = static_cast<int>(xievent->event_y);
571 if (!CommandLine::ForCurrentProcess()->HasSwitch( 571 if (!CommandLine::ForCurrentProcess()->HasSwitch(
572 switches::kEnableTouchCalibration)) 572 switches::kEnableTouchCalibration))
(...skipping 399 matching lines...) Expand 10 before | Expand all | Expand 10 after
972 noop->xclient.format = 8; 972 noop->xclient.format = 8;
973 DCHECK(!noop->xclient.display); 973 DCHECK(!noop->xclient.display);
974 } 974 }
975 // Make sure we use atom from current xdisplay, which may 975 // Make sure we use atom from current xdisplay, which may
976 // change during the test. 976 // change during the test.
977 noop->xclient.message_type = GetNoopEventAtom(); 977 noop->xclient.message_type = GetNoopEventAtom();
978 return noop; 978 return noop;
979 } 979 }
980 980
981 } // namespace ui 981 } // namespace ui
OLDNEW
« base/base.gypi ('K') | « ui/aura/x11_atom_cache.cc ('k') | ui/base/x/events_x.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698