Split //ui/events/devices into two targets.
Split /ui/events/devices into //ui/events/devices + //ui/events/devices/x11 to keep X11 code in a different component. Also udpate GYP targets in a similar fashion. Update some dependent targets and fix a few GN check problems that crop up because GN check doesn't fully understand #if defined(USE_X11) and includes. Originally commited at r388472 and reverted at r388474. There were missing deps in the GN Chrome OS X11 non-Ozone component build that I missed. Nothing in the CQ runs that configuration but it made a waterfall bot fail. TBR=sky@chromium.org,sievers@chromium.org BUG=588026 Review URL: https://codereview.chromium.org/1908473002 Cr-Commit-Position: refs/heads/master@{#388510}
This commit is contained in:
ash
chrome
content
ui
aura
base
events
platform_window
views
wm
@ -81,6 +81,7 @@ component("ash") {
|
||||
"//build/config/linux:xfixes",
|
||||
]
|
||||
deps += [
|
||||
"//ui/events/devices/x11",
|
||||
"//ui/events/platform",
|
||||
"//ui/gfx/x",
|
||||
]
|
||||
|
@ -1041,6 +1041,7 @@
|
||||
'dependencies': [
|
||||
'../build/linux/system.gyp:x11',
|
||||
'../build/linux/system.gyp:xfixes',
|
||||
'../ui/events/devices/x11/events_devices_x11.gyp:events_devices_x11',
|
||||
'../ui/gfx/x/gfx_x11.gyp:gfx_x11',
|
||||
],
|
||||
}],
|
||||
|
@ -37,7 +37,7 @@
|
||||
#include "ui/wm/core/wm_state.h"
|
||||
|
||||
#if defined(USE_X11)
|
||||
#include "ui/events/devices/x11/touch_factory_x11.h"
|
||||
#include "ui/events/devices/x11/touch_factory_x11.h" // nogncheck
|
||||
#endif
|
||||
|
||||
#if defined(OS_CHROMEOS)
|
||||
|
@ -4,6 +4,10 @@
|
||||
|
||||
#include "ash/touch/touch_hud_debug.h"
|
||||
|
||||
#include <algorithm>
|
||||
#include <string>
|
||||
#include <vector>
|
||||
|
||||
#include "ash/display/display_manager.h"
|
||||
#include "ash/root_window_controller.h"
|
||||
#include "ash/shell.h"
|
||||
@ -28,7 +32,7 @@
|
||||
#include <X11/extensions/XInput2.h>
|
||||
#include <X11/Xlib.h>
|
||||
|
||||
#include "ui/events/devices/x11/device_data_manager_x11.h"
|
||||
#include "ui/events/devices/x11/device_data_manager_x11.h" // nogncheck
|
||||
#endif
|
||||
|
||||
namespace ash {
|
||||
|
@ -141,7 +141,10 @@ source_set("chromeos") {
|
||||
]
|
||||
if (use_x11) {
|
||||
configs += [ "//build/config/linux:x11" ]
|
||||
deps += [ "//ui/events/devices" ]
|
||||
deps += [
|
||||
"//ui/events/devices",
|
||||
"//ui/events/devices/x11",
|
||||
]
|
||||
sources -= [
|
||||
"system/input_device_settings_impl_ozone.cc",
|
||||
"system_logs/touch_log_source_ozone.cc",
|
||||
|
@ -3292,6 +3292,7 @@
|
||||
'../build/linux/system.gyp:x11',
|
||||
'../build/linux/system.gyp:gio',
|
||||
'../ui/events/devices/events_devices.gyp:events_devices',
|
||||
'../ui/events/devices/x11/events_devices_x11.gyp:events_devices_x11',
|
||||
],
|
||||
}],
|
||||
['use_udev==1', {
|
||||
|
@ -269,6 +269,7 @@
|
||||
['use_x11 == 1', {
|
||||
'dependencies': [
|
||||
'../ui/events/devices/events_devices.gyp:events_devices',
|
||||
'../ui/events/devices/x11/events_devices_x11.gyp:events_devices_x11',
|
||||
'../tools/xdisplaycheck/xdisplaycheck.gyp:xdisplaycheck',
|
||||
],
|
||||
}],
|
||||
|
@ -288,7 +288,7 @@ static_library("content_shell_lib") {
|
||||
"//tools/xdisplaycheck",
|
||||
]
|
||||
|
||||
deps += [ "//ui/events/devices" ]
|
||||
deps += [ "//ui/events/devices/x11" ]
|
||||
}
|
||||
|
||||
if (is_android) {
|
||||
|
@ -116,6 +116,7 @@ component("aura") {
|
||||
deps += [
|
||||
"//ui/events:events_base",
|
||||
"//ui/events/devices",
|
||||
"//ui/events/devices/x11",
|
||||
"//ui/events/platform/x11",
|
||||
"//ui/gfx/x",
|
||||
]
|
||||
|
@ -118,6 +118,7 @@
|
||||
'../../build/linux/system.gyp:xrandr',
|
||||
'../../build/linux/system.gyp:xi',
|
||||
'../events/devices/events_devices.gyp:events_devices',
|
||||
'../events/devices/x11/events_devices_x11.gyp:events_devices_x11',
|
||||
'../events/platform/x11/x11_events_platform.gyp:x11_events_platform',
|
||||
'../gfx/x/gfx_x11.gyp:gfx_x11',
|
||||
],
|
||||
|
@ -412,6 +412,8 @@ component("base") {
|
||||
"dragdrop/drag_utils_aura.cc",
|
||||
]
|
||||
}
|
||||
|
||||
# TODO(kylechar): remove ozone_platform_x11 from here.
|
||||
if (use_x11 || ozone_platform_x11) {
|
||||
sources += [
|
||||
"x/x11_foreign_window_manager.cc",
|
||||
@ -431,7 +433,10 @@ component("base") {
|
||||
]
|
||||
configs += [ "//build/config/linux:xscrnsaver" ]
|
||||
}
|
||||
deps += [ "//ui/gfx/x" ]
|
||||
deps += [
|
||||
"//ui/events/devices/x11",
|
||||
"//ui/gfx/x",
|
||||
]
|
||||
}
|
||||
|
||||
if (!use_aura || !is_linux) {
|
||||
|
@ -607,6 +607,7 @@
|
||||
'../../build/linux/system.gyp:xfixes',
|
||||
'../../build/linux/system.gyp:xrender', # For XRender* function calls in x11_util.cc.
|
||||
'../events/devices/events_devices.gyp:events_devices',
|
||||
'../events/devices/x11/events_devices_x11.gyp:events_devices_x11',
|
||||
'../events/platform/x11/x11_events_platform.gyp:x11_events_platform',
|
||||
'../gfx/x/gfx_x11.gyp:gfx_x11',
|
||||
],
|
||||
|
@ -165,6 +165,7 @@ component("events") {
|
||||
]
|
||||
deps += [
|
||||
"//ui/events/devices",
|
||||
"//ui/events/devices/x11",
|
||||
"//ui/gfx/x",
|
||||
]
|
||||
}
|
||||
@ -338,7 +339,7 @@ source_set("test_support") {
|
||||
"test/events_test_utils_x11.h",
|
||||
]
|
||||
deps += [
|
||||
"//ui/events/devices",
|
||||
"//ui/events/devices/x11",
|
||||
"//ui/gfx/x",
|
||||
]
|
||||
}
|
||||
@ -425,6 +426,7 @@ test("events_unittests") {
|
||||
]
|
||||
configs += [ "//build/config/linux:x11" ]
|
||||
deps += [
|
||||
"//ui/events/devices/x11",
|
||||
"//ui/events/x",
|
||||
"//ui/gfx/x",
|
||||
]
|
||||
|
@ -2,9 +2,6 @@
|
||||
# Use of this source code is governed by a BSD-style license that can be
|
||||
# found in the LICENSE file.
|
||||
|
||||
import("//build/config/ui.gni")
|
||||
import("//ui/ozone/ozone.gni")
|
||||
|
||||
component("devices") {
|
||||
sources = [
|
||||
"device_data_manager.cc",
|
||||
@ -31,22 +28,4 @@ component("devices") {
|
||||
"//ui/gfx",
|
||||
"//ui/gfx/geometry",
|
||||
]
|
||||
|
||||
if (use_x11 || ozone_platform_x11) {
|
||||
configs += [ "//build/config/linux:x11" ]
|
||||
|
||||
sources += [
|
||||
"x11/device_data_manager_x11.cc",
|
||||
"x11/device_data_manager_x11.h",
|
||||
"x11/device_list_cache_x11.cc",
|
||||
"x11/device_list_cache_x11.h",
|
||||
"x11/touch_factory_x11.cc",
|
||||
"x11/touch_factory_x11.h",
|
||||
]
|
||||
|
||||
deps += [
|
||||
"//ui/events:events_base",
|
||||
"//ui/gfx/x",
|
||||
]
|
||||
}
|
||||
}
|
||||
|
@ -34,25 +34,10 @@
|
||||
'keyboard_device.h',
|
||||
'touchscreen_device.cc',
|
||||
'touchscreen_device.h',
|
||||
'x11/device_data_manager_x11.cc',
|
||||
'x11/device_data_manager_x11.h',
|
||||
'x11/device_list_cache_x11.cc',
|
||||
'x11/device_list_cache_x11.h',
|
||||
'x11/touch_factory_x11.cc',
|
||||
'x11/touch_factory_x11.h',
|
||||
],
|
||||
'export_dependent_settings': [
|
||||
'../../../ui/gfx/gfx.gyp:gfx',
|
||||
],
|
||||
'conditions': [
|
||||
['use_x11==1', {
|
||||
'dependencies': [
|
||||
'../../../build/linux/system.gyp:x11',
|
||||
'../../../ui/events/events.gyp:events_base',
|
||||
'../../../ui/gfx/x/gfx_x11.gyp:gfx_x11',
|
||||
],
|
||||
}],
|
||||
],
|
||||
},
|
||||
],
|
||||
}
|
||||
|
32
ui/events/devices/x11/BUILD.gn
Normal file
32
ui/events/devices/x11/BUILD.gn
Normal file
@ -0,0 +1,32 @@
|
||||
# Copyright 2016 The Chromium Authors. All rights reserved.
|
||||
# Use of this source code is governed by a BSD-style license that can be
|
||||
# found in the LICENSE file.
|
||||
|
||||
component("x11") {
|
||||
output_name = "events_devices_x11"
|
||||
|
||||
sources = [
|
||||
"device_data_manager_x11.cc",
|
||||
"device_data_manager_x11.h",
|
||||
"device_list_cache_x11.cc",
|
||||
"device_list_cache_x11.h",
|
||||
"events_devices_x11_export.h",
|
||||
"touch_factory_x11.cc",
|
||||
"touch_factory_x11.h",
|
||||
]
|
||||
|
||||
configs += [ "//build/config/linux:x11" ]
|
||||
|
||||
defines = [ "EVENTS_DEVICES_X11_IMPLEMENTATION" ]
|
||||
|
||||
deps = [
|
||||
"//base",
|
||||
"//base/third_party/dynamic_annotations",
|
||||
"//skia",
|
||||
"//ui/events:events_base",
|
||||
"//ui/events/devices",
|
||||
"//ui/gfx",
|
||||
"//ui/gfx/geometry",
|
||||
"//ui/gfx/x",
|
||||
]
|
||||
}
|
@ -24,7 +24,7 @@
|
||||
#include "base/event_types.h"
|
||||
#include "base/macros.h"
|
||||
#include "ui/events/devices/device_data_manager.h"
|
||||
#include "ui/events/devices/events_devices_export.h"
|
||||
#include "ui/events/devices/x11/events_devices_x11_export.h"
|
||||
#include "ui/events/event_constants.h"
|
||||
#include "ui/events/keycodes/keyboard_codes.h"
|
||||
#include "ui/gfx/geometry/rect.h"
|
||||
@ -49,7 +49,8 @@ enum ScrollType {
|
||||
|
||||
// A class that extracts and tracks the input events data. It currently handles
|
||||
// mouse, touchpad and touchscreen devices.
|
||||
class EVENTS_DEVICES_EXPORT DeviceDataManagerX11 : public DeviceDataManager {
|
||||
class EVENTS_DEVICES_X11_EXPORT DeviceDataManagerX11
|
||||
: public DeviceDataManager {
|
||||
public:
|
||||
// Enumerate additional data that one might be interested on an input event,
|
||||
// which are usually wrapped in X valuators. If you modify any of this,
|
||||
|
@ -12,7 +12,7 @@
|
||||
#include <memory>
|
||||
|
||||
#include "base/macros.h"
|
||||
#include "ui/events/devices/events_devices_export.h"
|
||||
#include "ui/events/devices/x11/events_devices_x11_export.h"
|
||||
#include "ui/gfx/x/x11_types.h"
|
||||
|
||||
namespace base {
|
||||
@ -38,7 +38,7 @@ namespace ui {
|
||||
// A class to cache the current XInput device list. This minimized the
|
||||
// round-trip time to the X server whenever such a device list is needed. The
|
||||
// update function will be called on each incoming XI_HierarchyChanged event.
|
||||
class EVENTS_DEVICES_EXPORT DeviceListCacheX11 {
|
||||
class EVENTS_DEVICES_X11_EXPORT DeviceListCacheX11 {
|
||||
public:
|
||||
static DeviceListCacheX11* GetInstance();
|
||||
|
||||
|
38
ui/events/devices/x11/events_devices_x11.gyp
Normal file
38
ui/events/devices/x11/events_devices_x11.gyp
Normal file
@ -0,0 +1,38 @@
|
||||
# Copyright 2016 The Chromium Authors. All rights reserved.
|
||||
# Use of this source code is governed by a BSD-style license that can be
|
||||
# found in the LICENSE file.
|
||||
|
||||
{
|
||||
'variables': {
|
||||
'chromium_code': 1,
|
||||
},
|
||||
'targets': [
|
||||
{
|
||||
'target_name': 'events_devices_x11',
|
||||
'type': '<(component)',
|
||||
'dependencies': [
|
||||
'../../../../base/base.gyp:base',
|
||||
'../../../../base/third_party/dynamic_annotations/dynamic_annotations.gyp:dynamic_annotations',
|
||||
'../../../../build/linux/system.gyp:x11',
|
||||
'../../../../skia/skia.gyp:skia',
|
||||
'../../../../ui/events/events.gyp:events_base',
|
||||
'../../../../ui/events/devices/events_devices.gyp:events_devices',
|
||||
'../../../../ui/gfx/gfx.gyp:gfx',
|
||||
'../../../../ui/gfx/gfx.gyp:gfx_geometry',
|
||||
'../../../../ui/gfx/x/gfx_x11.gyp:gfx_x11',
|
||||
],
|
||||
'defines': [
|
||||
'EVENTS_DEVICES_X11_IMPLEMENTATION',
|
||||
],
|
||||
'sources': [
|
||||
'device_data_manager_x11.cc',
|
||||
'device_data_manager_x11.h',
|
||||
'device_list_cache_x11.cc',
|
||||
'device_list_cache_x11.h',
|
||||
'events_devices_x11_export.h',
|
||||
'touch_factory_x11.cc',
|
||||
'touch_factory_x11.h',
|
||||
],
|
||||
},
|
||||
],
|
||||
}
|
29
ui/events/devices/x11/events_devices_x11_export.h
Normal file
29
ui/events/devices/x11/events_devices_x11_export.h
Normal file
@ -0,0 +1,29 @@
|
||||
// Copyright 2016 The Chromium Authors. All rights reserved.
|
||||
// Use of this source code is governed by a BSD-style license that can be
|
||||
// found in the LICENSE file.
|
||||
|
||||
#ifndef UI_EVENTS_DEVICES_X11_EVENTS_DEVICES_X11_EXPORT_H_
|
||||
#define UI_EVENTS_DEVICES_X11_EVENTS_DEVICES_X11_EXPORT_H_
|
||||
|
||||
#if defined(COMPONENT_BUILD)
|
||||
#if defined(WIN32)
|
||||
|
||||
#if defined(EVENTS_DEVICES_X11_IMPLEMENTATION)
|
||||
#define EVENTS_DEVICES_X11_EXPORT __declspec(dllexport)
|
||||
#else
|
||||
#define EVENTS_DEVICES_X11_EXPORT __declspec(dllimport)
|
||||
#endif // defined(EVENTS_DEVICES_X11_IMPLEMENTATION)
|
||||
|
||||
#else // defined(WIN32)
|
||||
#if defined(EVENTS_DEVICES_X11_IMPLEMENTATION)
|
||||
#define EVENTS_DEVICES_X11_EXPORT __attribute__((visibility("default")))
|
||||
#else
|
||||
#define EVENTS_DEVICES_X11_EXPORT
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#else // defined(COMPONENT_BUILD)
|
||||
#define EVENTS_DEVICES_X11_EXPORT
|
||||
#endif
|
||||
|
||||
#endif // UI_EVENTS_DEVICES_X11_EVENTS_DEVICES_X11_EXPORT_H_
|
@ -14,7 +14,7 @@
|
||||
#include <vector>
|
||||
|
||||
#include "base/macros.h"
|
||||
#include "ui/events/devices/events_devices_export.h"
|
||||
#include "ui/events/devices/x11/events_devices_x11_export.h"
|
||||
#include "ui/gfx/sequential_id_generator.h"
|
||||
|
||||
namespace base {
|
||||
@ -30,7 +30,7 @@ typedef union _XEvent XEvent;
|
||||
namespace ui {
|
||||
|
||||
// Functions related to determining touch devices.
|
||||
class EVENTS_DEVICES_EXPORT TouchFactory {
|
||||
class EVENTS_DEVICES_X11_EXPORT TouchFactory {
|
||||
private:
|
||||
TouchFactory();
|
||||
~TouchFactory();
|
||||
|
@ -162,6 +162,7 @@
|
||||
'../../build/linux/system.gyp:x11',
|
||||
'../gfx/x/gfx_x11.gyp:gfx_x11',
|
||||
'devices/events_devices.gyp:events_devices',
|
||||
'devices/x11/events_devices_x11.gyp:events_devices_x11',
|
||||
'x/events_x.gyp:events_x',
|
||||
],
|
||||
}],
|
||||
@ -362,6 +363,11 @@
|
||||
# The cocoa files don't apply to iOS.
|
||||
'sources/': [['exclude', 'cocoa']],
|
||||
}],
|
||||
['use_x11==1', {
|
||||
'dependencies': [
|
||||
'devices/x11/events_devices_x11.gyp:events_devices_x11',
|
||||
],
|
||||
}],
|
||||
['use_x11==1 or use_ozone==1', {
|
||||
'sources' : [
|
||||
'test/device_data_manager_test_api_impl.cc',
|
||||
|
@ -72,7 +72,8 @@
|
||||
'dependencies': [
|
||||
'../../build/linux/system.gyp:x11',
|
||||
'../gfx/x/gfx_x11.gyp:gfx_x11',
|
||||
'x/events_x.gyp:events_x',
|
||||
'devices/x11/events_devices_x11.gyp:events_devices_x11',
|
||||
'x/events_x.gyp:events_x',
|
||||
],
|
||||
}],
|
||||
['use_ozone==1', {
|
||||
|
@ -25,6 +25,7 @@ component("x11") {
|
||||
"//ui/events",
|
||||
"//ui/events:events_base",
|
||||
"//ui/events/devices",
|
||||
"//ui/events/devices/x11",
|
||||
"//ui/events/platform",
|
||||
"//ui/events/x",
|
||||
"//ui/gfx/x",
|
||||
|
@ -18,6 +18,7 @@
|
||||
'../../../../build/linux/system.gyp:x11',
|
||||
'../../../gfx/x/gfx_x11.gyp:gfx_x11',
|
||||
'../../devices/events_devices.gyp:events_devices',
|
||||
'../../devices/x11/events_devices_x11.gyp:events_devices_x11',
|
||||
'../../events.gyp:events',
|
||||
'../../events.gyp:events_base',
|
||||
'../../x/events_x.gyp:events_x',
|
||||
|
@ -3,6 +3,7 @@
|
||||
# found in the LICENSE file.
|
||||
|
||||
component("x") {
|
||||
output_name = "events_x"
|
||||
sources = [
|
||||
"events_x_export.h",
|
||||
"events_x_utils.cc",
|
||||
@ -14,6 +15,7 @@ component("x") {
|
||||
"//skia",
|
||||
"//ui/events:events_base",
|
||||
"//ui/events/devices",
|
||||
"//ui/events/devices/x11",
|
||||
"//ui/gfx/x",
|
||||
]
|
||||
configs += [ "//build/config/linux:x11" ]
|
||||
|
@ -15,6 +15,7 @@
|
||||
'<(DEPTH)/base/base.gyp:base',
|
||||
'<(DEPTH)/skia/skia.gyp:skia',
|
||||
'../../events/devices/events_devices.gyp:events_devices',
|
||||
'../../events/devices/x11/events_devices_x11.gyp:events_devices_x11',
|
||||
'../../events/events.gyp:events_base',
|
||||
'../../gfx/x/gfx_x11.gyp:gfx_x11',
|
||||
],
|
||||
|
@ -15,6 +15,7 @@ component("x11") {
|
||||
"//skia",
|
||||
"//ui/events",
|
||||
"//ui/events/devices",
|
||||
"//ui/events/devices/x11",
|
||||
"//ui/events/platform",
|
||||
"//ui/events/platform/x11",
|
||||
"//ui/gfx/x",
|
||||
|
@ -17,6 +17,7 @@
|
||||
'../../../skia/skia.gyp:skia',
|
||||
'../../events/devices/events_devices.gyp:events_devices',
|
||||
'../../events/events.gyp:events',
|
||||
'../../events/devices/x11/events_devices_x11.gyp:events_devices_x11',
|
||||
'../../events/platform/events_platform.gyp:events_platform',
|
||||
'../../events/platform/x11/x11_events_platform.gyp:x11_events_platform',
|
||||
'../../gfx/x/gfx_x11.gyp:gfx_x11',
|
||||
|
@ -105,6 +105,7 @@ component("views") {
|
||||
]
|
||||
deps += [
|
||||
"//ui/events/devices",
|
||||
"//ui/events/devices/x11",
|
||||
"//ui/events/platform/x11",
|
||||
"//ui/gfx/x",
|
||||
]
|
||||
|
@ -763,6 +763,7 @@
|
||||
'../../build/linux/system.gyp:x11',
|
||||
'../../build/linux/system.gyp:xrandr',
|
||||
'../events/devices/events_devices.gyp:events_devices',
|
||||
'../events/devices/x11/events_devices_x11.gyp:events_devices_x11',
|
||||
'../events/platform/x11/x11_events_platform.gyp:x11_events_platform',
|
||||
'../gfx/x/gfx_x11.gyp:gfx_x11',
|
||||
],
|
||||
|
@ -85,6 +85,7 @@ component("wm") {
|
||||
|
||||
if (use_x11) {
|
||||
configs += [ "//build/config/linux:x11" ]
|
||||
deps += [ "//ui/events/devices/x11" ]
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -18,7 +18,7 @@
|
||||
#include "ui/wm/public/drag_drop_client.h"
|
||||
|
||||
#if defined(OS_CHROMEOS) && defined(USE_X11)
|
||||
#include "ui/events/devices/x11/touch_factory_x11.h"
|
||||
#include "ui/events/devices/x11/touch_factory_x11.h" // nogncheck
|
||||
#endif
|
||||
|
||||
namespace wm {
|
||||
|
@ -91,6 +91,7 @@
|
||||
['use_x11==1', {
|
||||
'dependencies': [
|
||||
'../../build/linux/system.gyp:x11',
|
||||
'../events/devices/x11/events_devices_x11.gyp:events_devices_x11',
|
||||
],
|
||||
}],
|
||||
],
|
||||
|
Reference in New Issue
Block a user