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

Unified Diff: ui/events/platform/x11/x11_hotplug_event_handler.cc

Issue 2924343002: Move ui::GetAtom to gfx::GetAtom (Closed)
Patch Set: fix CrOs build Created 3 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « ui/events/platform/x11/x11_event_source.cc ('k') | ui/gfx/icc_profile_x11.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/events/platform/x11/x11_hotplug_event_handler.cc
diff --git a/ui/events/platform/x11/x11_hotplug_event_handler.cc b/ui/events/platform/x11/x11_hotplug_event_handler.cc
index f6f6b159b36674c24603c60c36e9181470938ada..0cb2568488a014d77229d37dca893bca6249bb27 100644
--- a/ui/events/platform/x11/x11_hotplug_event_handler.cc
+++ b/ui/events/platform/x11/x11_hotplug_event_handler.cc
@@ -25,7 +25,6 @@
#include "base/sys_info.h"
#include "base/threading/thread_task_runner_handle.h"
#include "base/threading/worker_pool.h"
-#include "ui/base/x/x11_util.h"
#include "ui/events/devices/device_data_manager.h"
#include "ui/events/devices/device_hotplug_event_observer.h"
#include "ui/events/devices/device_util_linux.h"
@@ -197,7 +196,7 @@ base::FilePath GetDevicePath(XDisplay* dpy, const XIDeviceInfo& device) {
// Input device has a property "Device Node" pointing to its dev input node,
// e.g. Device Node (250): "/dev/input/event8"
- Atom device_node = ui::X11AtomCache::GetInstance()->GetAtom("Device Node");
+ Atom device_node = gfx::GetAtom("Device Node");
if (device_node == None)
return base::FilePath();
@@ -423,13 +422,13 @@ void X11HotplugEventHandler::OnHotplugEvent() {
continue;
Atom type = device_list_xi[i].type;
- if (type == GetAtom(XI_KEYBOARD))
+ if (type == gfx::GetAtom(XI_KEYBOARD))
device_types[id] = DEVICE_TYPE_KEYBOARD;
- else if (type == GetAtom(XI_MOUSE))
+ else if (type == gfx::GetAtom(XI_MOUSE))
device_types[id] = DEVICE_TYPE_MOUSE;
- else if (type == GetAtom(XI_TOUCHPAD))
+ else if (type == gfx::GetAtom(XI_TOUCHPAD))
device_types[id] = DEVICE_TYPE_TOUCHPAD;
- else if (type == GetAtom(XI_TOUCHSCREEN))
+ else if (type == gfx::GetAtom(XI_TOUCHSCREEN))
device_types[id] = DEVICE_TYPE_TOUCHSCREEN;
}
@@ -454,8 +453,9 @@ void X11HotplugEventHandler::OnHotplugEvent() {
uint16_t vendor = 0;
uint16_t product = 0;
if (XIGetProperty(gfx::GetXDisplay(), device.deviceid,
- GetAtom(XI_PROP_PRODUCT_ID), 0, 2, 0, XA_INTEGER, &type,
- &format_return, &num_items_return, &bytes_after_return,
+ gfx::GetAtom(XI_PROP_PRODUCT_ID), 0, 2, 0, XA_INTEGER,
+ &type, &format_return, &num_items_return,
+ &bytes_after_return,
reinterpret_cast<unsigned char**>(&product_info)) == 0 &&
product_info) {
if (num_items_return == 2) {
@@ -471,8 +471,8 @@ void X11HotplugEventHandler::OnHotplugEvent() {
// X11 is not thread safe, so first get all the required state.
DisplayState display_state;
- display_state.mt_position_x = GetAtom("Abs MT Position X");
- display_state.mt_position_y = GetAtom("Abs MT Position Y");
+ display_state.mt_position_x = gfx::GetAtom("Abs MT Position X");
+ display_state.mt_position_y = gfx::GetAtom("Abs MT Position Y");
UiCallbacks callbacks;
callbacks.keyboard_callback = base::Bind(&OnKeyboardDevices);
« no previous file with comments | « ui/events/platform/x11/x11_event_source.cc ('k') | ui/gfx/icc_profile_x11.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698