Skip to content

Commit

Permalink
Implements Drag and Drop for Ozone/X11
Browse files Browse the repository at this point in the history
It introduces X11DragSource and X11DragContext to handle DnD
on Ozone/X11. They are from DesktopDragDropClientAuraX11 which
includes implementation for platform layer.

X11DragSource handles event and deliver the data at a server side
and X11DragContext handles events and read the data at a client
side.

It splits OSExchangeDataProviderAuraX11 to OSExchangeDataProviderAuraX11
and OSExchangeDataProviderAuraX11Base to resue it.
OSExchangeDataProviderAuraX11 keeps only platform event specific part.
  • Loading branch information
jkim-julie committed Nov 5, 2018
1 parent a54b962 commit edbf0d0
Show file tree
Hide file tree
Showing 16 changed files with 2,076 additions and 545 deletions.
47 changes: 32 additions & 15 deletions ui/base/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -453,9 +453,12 @@ jumbo_component("base") {
deps += [ "//ui/events" ]
}

if (use_x11 || ozone_platform_x11) {
configs += [ "//build/config/linux:x11" ]
}

if (use_x11) {
public_deps += [ "//ui/base/x" ]
configs += [ "//build/config/linux:x11" ]

if (!is_chromeos) {
sources += [
Expand All @@ -469,30 +472,44 @@ jumbo_component("base") {
}
}

if (use_x11 && use_aura) {
if ((use_x11 || ozone_platform_x11) && use_aura) {
sources += [
"cursor/cursor_loader_x11.cc",
"cursor/cursor_loader_x11.h",
"cursor/cursor_x11.cc",
"x/selection_owner.cc",
"x/selection_owner.h",
"x/selection_requestor.cc",
"x/selection_requestor.h",
"x/selection_utils.cc",
"x/selection_utils.h",
]
deps += [
"//ui/events/platform/x11",
"//ui/gfx/x",
"x/selection_owner.cc",
"x/selection_owner.h",
]

if (!is_chromeos) {
# These Aura X11 files aren't used on ChromeOS.
sources += [
"dragdrop/os_exchange_data_provider_aurax11.cc",
"dragdrop/os_exchange_data_provider_aurax11.h",
"dragdrop/os_exchange_data_provider_aurax11_base.cc",
"dragdrop/os_exchange_data_provider_aurax11_base.h",
]
}

if (use_x11 && use_aura) {
sources += [
"cursor/cursor_loader_x11.cc",
"cursor/cursor_loader_x11.h",
"cursor/cursor_x11.cc",
"x/selection_requestor.cc",
"x/selection_requestor.h",
]

if (!is_chromeos) {
# These Aura X11 files aren't used on ChromeOS.
sources += [
"dragdrop/os_exchange_data_provider_aurax11.cc",
"dragdrop/os_exchange_data_provider_aurax11.h",
]
}
}

deps += [
"//ui/events/platform/x11",
"//ui/gfx/x",
]
}

if (use_aura) {
Expand Down
Loading

0 comments on commit edbf0d0

Please sign in to comment.