Commit 82ff17de authored by Nick Diego Yamane's avatar Nick Diego Yamane Committed by Commit Bot

exo: Fix cast linux builds

Restrict extended-drag extension to OS_CHROMEOS as it depends directly
into some ash components, which are not included in cast product builds.

R=oshima@chromium.org, spang@chromium.org

Bug: 1099418, 1146150
Change-Id: I5269825917ce9343e438aaabb9b11f560187ac0e
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2521694
Commit-Queue: Nick Yamane <nickdiego@igalia.com>
Reviewed-by: default avatarMitsuru Oshima <oshima@chromium.org>
Cr-Commit-Position: refs/heads/master@{#824949}
parent ffad4ce0
...@@ -33,10 +33,6 @@ static_library("exo") { ...@@ -33,10 +33,6 @@ static_library("exo") {
"display.h", "display.h",
"drag_drop_operation.cc", "drag_drop_operation.cc",
"drag_drop_operation.h", "drag_drop_operation.h",
"extended_drag_offer.cc",
"extended_drag_offer.h",
"extended_drag_source.cc",
"extended_drag_source.h",
"frame_sink_resource_manager.cc", "frame_sink_resource_manager.cc",
"frame_sink_resource_manager.h", "frame_sink_resource_manager.h",
"input_trace.h", "input_trace.h",
...@@ -139,6 +135,10 @@ static_library("exo") { ...@@ -139,6 +135,10 @@ static_library("exo") {
"client_controlled_accelerators.h", "client_controlled_accelerators.h",
"client_controlled_shell_surface.cc", "client_controlled_shell_surface.cc",
"client_controlled_shell_surface.h", "client_controlled_shell_surface.h",
"extended_drag_offer.cc",
"extended_drag_offer.h",
"extended_drag_source.cc",
"extended_drag_source.h",
"gamepad.cc", "gamepad.cc",
"gamepad.h", "gamepad.h",
"gamepad_observer.h", "gamepad_observer.h",
......
...@@ -10,7 +10,6 @@ ...@@ -10,7 +10,6 @@
#include "base/threading/sequenced_task_runner_handle.h" #include "base/threading/sequenced_task_runner_handle.h"
#include "components/exo/data_offer.h" #include "components/exo/data_offer.h"
#include "components/exo/data_source.h" #include "components/exo/data_source.h"
#include "components/exo/extended_drag_source.h"
#include "components/exo/seat.h" #include "components/exo/seat.h"
#include "components/exo/surface.h" #include "components/exo/surface.h"
#include "components/viz/common/frame_sinks/copy_output_request.h" #include "components/viz/common/frame_sinks/copy_output_request.h"
...@@ -29,6 +28,7 @@ ...@@ -29,6 +28,7 @@
#if defined(OS_CHROMEOS) #if defined(OS_CHROMEOS)
#include "ash/drag_drop/drag_drop_controller.h" #include "ash/drag_drop/drag_drop_controller.h"
#include "components/exo/extended_drag_source.h"
#endif // defined(OS_CHROMEOS) #endif // defined(OS_CHROMEOS)
namespace exo { namespace exo {
...@@ -88,10 +88,9 @@ base::WeakPtr<DragDropOperation> DragDropOperation::Create( ...@@ -88,10 +88,9 @@ base::WeakPtr<DragDropOperation> DragDropOperation::Create(
Surface* origin, Surface* origin,
Surface* icon, Surface* icon,
const gfx::PointF& drag_start_point, const gfx::PointF& drag_start_point,
ui::mojom::DragEventSource event_source, ui::mojom::DragEventSource event_source) {
ExtendedDragSource* extended_drag_source) {
auto* dnd_op = new DragDropOperation(source, origin, icon, drag_start_point, auto* dnd_op = new DragDropOperation(source, origin, icon, drag_start_point,
event_source, extended_drag_source); event_source);
return dnd_op->weak_ptr_factory_.GetWeakPtr(); return dnd_op->weak_ptr_factory_.GetWeakPtr();
} }
...@@ -99,15 +98,13 @@ DragDropOperation::DragDropOperation(DataSource* source, ...@@ -99,15 +98,13 @@ DragDropOperation::DragDropOperation(DataSource* source,
Surface* origin, Surface* origin,
Surface* icon, Surface* icon,
const gfx::PointF& drag_start_point, const gfx::PointF& drag_start_point,
ui::mojom::DragEventSource event_source, ui::mojom::DragEventSource event_source)
ExtendedDragSource* extended_drag_source)
: SurfaceTreeHost("ExoDragDropOperation"), : SurfaceTreeHost("ExoDragDropOperation"),
source_(std::make_unique<ScopedDataSource>(source, this)), source_(std::make_unique<ScopedDataSource>(source, this)),
origin_(std::make_unique<ScopedSurface>(origin, this)), origin_(std::make_unique<ScopedSurface>(origin, this)),
drag_start_point_(drag_start_point), drag_start_point_(drag_start_point),
os_exchange_data_(std::make_unique<ui::OSExchangeData>()), os_exchange_data_(std::make_unique<ui::OSExchangeData>()),
event_source_(event_source), event_source_(event_source) {
extended_drag_source_(extended_drag_source) {
aura::Window* root_window = origin_->get()->window()->GetRootWindow(); aura::Window* root_window = origin_->get()->window()->GetRootWindow();
DCHECK(root_window); DCHECK(root_window);
#if defined(OS_CHROMEOS) #if defined(OS_CHROMEOS)
...@@ -123,13 +120,14 @@ DragDropOperation::DragDropOperation(DataSource* source, ...@@ -123,13 +120,14 @@ DragDropOperation::DragDropOperation(DataSource* source,
drag_drop_controller_->AddObserver(this); drag_drop_controller_->AddObserver(this);
if (extended_drag_source_) {
#if defined(OS_CHROMEOS) #if defined(OS_CHROMEOS)
extended_drag_source_ = ExtendedDragSource::Get();
if (extended_drag_source_) {
drag_drop_controller_->set_toplevel_window_drag_delegate( drag_drop_controller_->set_toplevel_window_drag_delegate(
extended_drag_source_); extended_drag_source_);
#endif
extended_drag_source_->AddObserver(this); extended_drag_source_->AddObserver(this);
} }
#endif
if (icon) if (icon)
icon_ = std::make_unique<ScopedSurface>(icon, this); icon_ = std::make_unique<ScopedSurface>(icon, this);
...@@ -169,10 +167,10 @@ DragDropOperation::~DragDropOperation() { ...@@ -169,10 +167,10 @@ DragDropOperation::~DragDropOperation() {
if (drag_drop_controller_->IsDragDropInProgress() && started_by_this_object_) if (drag_drop_controller_->IsDragDropInProgress() && started_by_this_object_)
drag_drop_controller_->DragCancel(); drag_drop_controller_->DragCancel();
if (extended_drag_source_) { #if defined(OS_CHROMEOS)
extended_drag_source_->RemoveObserver(this); if (extended_drag_source_)
extended_drag_source_ = nullptr; ResetExtendedDragSource();
} #endif
} }
void DragDropOperation::AbortIfPending() { void DragDropOperation::AbortIfPending() {
...@@ -348,17 +346,19 @@ void DragDropOperation::OnDragActionsChanged(int actions) { ...@@ -348,17 +346,19 @@ void DragDropOperation::OnDragActionsChanged(int actions) {
source_->get()->Action(dnd_action); source_->get()->Action(dnd_action);
} }
#endif
void DragDropOperation::OnExtendedDragSourceDestroying( void DragDropOperation::OnExtendedDragSourceDestroying(
ExtendedDragSource* source) { ExtendedDragSource* source) {
ResetExtendedDragSource();
}
void DragDropOperation::ResetExtendedDragSource() {
DCHECK(extended_drag_source_); DCHECK(extended_drag_source_);
extended_drag_source_->RemoveObserver(this); extended_drag_source_->RemoveObserver(this);
#if defined(OS_CHROMEOS)
drag_drop_controller_->set_toplevel_window_drag_delegate(nullptr); drag_drop_controller_->set_toplevel_window_drag_delegate(nullptr);
#endif
extended_drag_source_ = nullptr; extended_drag_source_ = nullptr;
} }
#endif
void DragDropOperation::OnSurfaceDestroying(Surface* surface) { void DragDropOperation::OnSurfaceDestroying(Surface* surface) {
DCHECK(surface == origin_->get() || surface == icon_->get()); DCHECK(surface == origin_->get() || surface == icon_->get());
......
...@@ -8,7 +8,6 @@ ...@@ -8,7 +8,6 @@
#include "components/exo/data_device.h" #include "components/exo/data_device.h"
#include "components/exo/data_offer_observer.h" #include "components/exo/data_offer_observer.h"
#include "components/exo/data_source_observer.h" #include "components/exo/data_source_observer.h"
#include "components/exo/extended_drag_source.h"
#include "components/exo/surface_observer.h" #include "components/exo/surface_observer.h"
#include "components/exo/surface_tree_host.h" #include "components/exo/surface_tree_host.h"
#include "components/exo/wm_helper.h" #include "components/exo/wm_helper.h"
...@@ -16,6 +15,10 @@ ...@@ -16,6 +15,10 @@
#include "ui/base/dragdrop/mojom/drag_drop_types.mojom-forward.h" #include "ui/base/dragdrop/mojom/drag_drop_types.mojom-forward.h"
#include "ui/gfx/geometry/point_f.h" #include "ui/gfx/geometry/point_f.h"
#if defined(OS_CHROMEOS)
#include "components/exo/extended_drag_source.h"
#endif
namespace ash { namespace ash {
class DragDropController; class DragDropController;
} // namespace ash } // namespace ash
...@@ -35,7 +38,6 @@ class CopyOutputResult; ...@@ -35,7 +38,6 @@ class CopyOutputResult;
} }
namespace exo { namespace exo {
class ExtendedDragSource;
class ScopedDataSource; class ScopedDataSource;
// This class represents an ongoing drag-drop operation started by an exo // This class represents an ongoing drag-drop operation started by an exo
...@@ -46,8 +48,10 @@ class ScopedDataSource; ...@@ -46,8 +48,10 @@ class ScopedDataSource;
class DragDropOperation : public DataSourceObserver, class DragDropOperation : public DataSourceObserver,
public SurfaceTreeHost, public SurfaceTreeHost,
public SurfaceObserver, public SurfaceObserver,
public aura::client::DragDropClientObserver, #if defined(OS_CHROMEOS)
public ExtendedDragSource::Observer { public ExtendedDragSource::Observer,
#endif
public aura::client::DragDropClientObserver {
public: public:
// Create an operation for a drag-drop originating from a wayland app. // Create an operation for a drag-drop originating from a wayland app.
static base::WeakPtr<DragDropOperation> Create( static base::WeakPtr<DragDropOperation> Create(
...@@ -55,8 +59,7 @@ class DragDropOperation : public DataSourceObserver, ...@@ -55,8 +59,7 @@ class DragDropOperation : public DataSourceObserver,
Surface* origin, Surface* origin,
Surface* icon, Surface* icon,
const gfx::PointF& drag_start_point, const gfx::PointF& drag_start_point,
ui::mojom::DragEventSource event_source, ui::mojom::DragEventSource event_source);
ExtendedDragSource* extended_drag_source);
// Abort the operation if it hasn't been started yet, otherwise do nothing. // Abort the operation if it hasn't been started yet, otherwise do nothing.
void AbortIfPending(); void AbortIfPending();
...@@ -75,10 +78,10 @@ class DragDropOperation : public DataSourceObserver, ...@@ -75,10 +78,10 @@ class DragDropOperation : public DataSourceObserver,
void OnDragEnded() override; void OnDragEnded() override;
#if defined(OS_CHROMEOS) #if defined(OS_CHROMEOS)
void OnDragActionsChanged(int actions) override; void OnDragActionsChanged(int actions) override;
#endif
// ExtendedDragSource::Observer: // ExtendedDragSource::Observer:
void OnExtendedDragSourceDestroying(ExtendedDragSource* source) override; void OnExtendedDragSourceDestroying(ExtendedDragSource* source) override;
#endif
private: private:
// A private constructor and destructor are used to prevent anyone else from // A private constructor and destructor are used to prevent anyone else from
...@@ -87,8 +90,7 @@ class DragDropOperation : public DataSourceObserver, ...@@ -87,8 +90,7 @@ class DragDropOperation : public DataSourceObserver,
Surface* origin, Surface* origin,
Surface* icon, Surface* icon,
const gfx::PointF& drag_start_point, const gfx::PointF& drag_start_point,
ui::mojom::DragEventSource event_source, ui::mojom::DragEventSource event_source);
ExtendedDragSource* extended_drag_source);
~DragDropOperation() override; ~DragDropOperation() override;
void CaptureDragIcon(); void CaptureDragIcon();
...@@ -105,7 +107,9 @@ class DragDropOperation : public DataSourceObserver, ...@@ -105,7 +107,9 @@ class DragDropOperation : public DataSourceObserver,
// directly. Use ScheduleStartDragDropOperation instead. // directly. Use ScheduleStartDragDropOperation instead.
void StartDragDropOperation(); void StartDragDropOperation();
void ResetSource(); #if defined(OS_CHROMEOS)
void ResetExtendedDragSource();
#endif
std::unique_ptr<ScopedDataSource> source_; std::unique_ptr<ScopedDataSource> source_;
std::unique_ptr<ScopedSurface> icon_; std::unique_ptr<ScopedSurface> icon_;
...@@ -134,7 +138,9 @@ class DragDropOperation : public DataSourceObserver, ...@@ -134,7 +138,9 @@ class DragDropOperation : public DataSourceObserver,
ui::mojom::DragEventSource event_source_; ui::mojom::DragEventSource event_source_;
#if defined(OS_CHROMEOS)
ExtendedDragSource* extended_drag_source_; ExtendedDragSource* extended_drag_source_;
#endif
base::WeakPtrFactory<DragDropOperation> weak_ptr_factory_{this}; base::WeakPtrFactory<DragDropOperation> weak_ptr_factory_{this};
......
...@@ -105,7 +105,7 @@ TEST_F(DragDropOperationTest, DeleteDuringDragging) { ...@@ -105,7 +105,7 @@ TEST_F(DragDropOperationTest, DeleteDuringDragging) {
auto operation = DragDropOperation::Create( auto operation = DragDropOperation::Create(
data_source.get(), origin_surface.get(), icon_surface.get(), data_source.get(), origin_surface.get(), icon_surface.get(),
gfx::PointF(), ui::mojom::DragEventSource::kMouse, nullptr); gfx::PointF(), ui::mojom::DragEventSource::kMouse);
icon_surface->Commit(); icon_surface->Commit();
base::RunLoop run_loop; base::RunLoop run_loop;
......
...@@ -9,12 +9,12 @@ ...@@ -9,12 +9,12 @@
#include "ash/shell.h" #include "ash/shell.h"
#include "ash/wm/toplevel_window_event_handler.h" #include "ash/wm/toplevel_window_event_handler.h"
#include "base/check.h"
#include "base/check_op.h" #include "base/check_op.h"
#include "base/logging.h" #include "base/logging.h"
#include "base/notreached.h" #include "base/notreached.h"
#include "base/optional.h" #include "base/optional.h"
#include "components/exo/data_source.h" #include "components/exo/data_source.h"
#include "components/exo/seat.h"
#include "components/exo/surface.h" #include "components/exo/surface.h"
#include "ui/aura/client/aura_constants.h" #include "ui/aura/client/aura_constants.h"
#include "ui/aura/window_observer.h" #include "ui/aura/window_observer.h"
...@@ -33,6 +33,9 @@ ...@@ -33,6 +33,9 @@
namespace exo { namespace exo {
// static
ExtendedDragSource* ExtendedDragSource::instance_ = nullptr;
// Internal representation of a toplevel window, backed by an Exo shell surface, // Internal representation of a toplevel window, backed by an Exo shell surface,
// which is being dragged. It supports both already mapped/visible windows as // which is being dragged. It supports both already mapped/visible windows as
// well as newly created ones (i.e: not added to a root window yet), in which // well as newly created ones (i.e: not added to a root window yet), in which
...@@ -97,16 +100,20 @@ class ExtendedDragSource::DraggedWindowHolder : public aura::WindowObserver { ...@@ -97,16 +100,20 @@ class ExtendedDragSource::DraggedWindowHolder : public aura::WindowObserver {
aura::Window* toplevel_window_ = nullptr; aura::Window* toplevel_window_ = nullptr;
}; };
ExtendedDragSource::ExtendedDragSource(Seat* seat, // static
DataSource* source, ExtendedDragSource* ExtendedDragSource::Get() {
Delegate* delegate) return instance_;
: seat_(seat), source_(source), delegate_(delegate) { }
DCHECK(seat_);
ExtendedDragSource::ExtendedDragSource(DataSource* source, Delegate* delegate)
: source_(source), delegate_(delegate) {
DCHECK(source_); DCHECK(source_);
DCHECK(delegate_); DCHECK(delegate_);
seat_->set_extended_drag_source(this);
source_->AddObserver(this); source_->AddObserver(this);
DCHECK(!instance_);
instance_ = this;
} }
ExtendedDragSource::~ExtendedDragSource() { ExtendedDragSource::~ExtendedDragSource() {
...@@ -114,9 +121,11 @@ ExtendedDragSource::~ExtendedDragSource() { ...@@ -114,9 +121,11 @@ ExtendedDragSource::~ExtendedDragSource() {
for (auto& observer : observers_) for (auto& observer : observers_)
observer.OnExtendedDragSourceDestroying(this); observer.OnExtendedDragSourceDestroying(this);
seat_->set_extended_drag_source(nullptr);
if (source_) if (source_)
source_->RemoveObserver(this); source_->RemoveObserver(this);
DCHECK_EQ(instance_, this);
instance_ = nullptr;
} }
void ExtendedDragSource::AddObserver(Observer* observer) { void ExtendedDragSource::AddObserver(Observer* observer) {
......
...@@ -33,7 +33,6 @@ class LocatedEvent; ...@@ -33,7 +33,6 @@ class LocatedEvent;
namespace exo { namespace exo {
class DataSource; class DataSource;
class Seat;
class Surface; class Surface;
class ExtendedDragSource : public DataSourceObserver, class ExtendedDragSource : public DataSourceObserver,
...@@ -60,7 +59,9 @@ class ExtendedDragSource : public DataSourceObserver, ...@@ -60,7 +59,9 @@ class ExtendedDragSource : public DataSourceObserver,
virtual ~Observer() = default; virtual ~Observer() = default;
}; };
ExtendedDragSource(Seat* seat, DataSource* source, Delegate* delegate); static ExtendedDragSource* Get();
ExtendedDragSource(DataSource* source, Delegate* delegate);
ExtendedDragSource(const ExtendedDragSource&) = delete; ExtendedDragSource(const ExtendedDragSource&) = delete;
ExtendedDragSource& operator=(const ExtendedDragSource&) = delete; ExtendedDragSource& operator=(const ExtendedDragSource&) = delete;
~ExtendedDragSource() override; ~ExtendedDragSource() override;
...@@ -96,7 +97,8 @@ class ExtendedDragSource : public DataSourceObserver, ...@@ -96,7 +97,8 @@ class ExtendedDragSource : public DataSourceObserver,
gfx::Point CalculateOrigin(aura::Window* target) const; gfx::Point CalculateOrigin(aura::Window* target) const;
void Cleanup(); void Cleanup();
Seat* const seat_; static ExtendedDragSource* instance_;
DataSource* source_ = nullptr; DataSource* source_ = nullptr;
// Created and destroyed at wayland/zcr_extended_drag.cc and its lifetime is // Created and destroyed at wayland/zcr_extended_drag.cc and its lifetime is
......
...@@ -114,11 +114,10 @@ class ExtendedDragSourceTest : public test::ExoTestBase { ...@@ -114,11 +114,10 @@ class ExtendedDragSourceTest : public test::ExoTestBase {
seat_ = std::make_unique<Seat>(); seat_ = std::make_unique<Seat>();
data_source_ = std::make_unique<DataSource>(new TestDataSourceDelegate); data_source_ = std::make_unique<DataSource>(new TestDataSourceDelegate);
extended_drag_source_ = extended_drag_source_ = std::make_unique<ExtendedDragSource>(
std::make_unique<ExtendedDragSource>(seat_.get(), data_source_.get(), data_source_.get(), new TestExtendedDragSourceDelegate(
new TestExtendedDragSourceDelegate( /*allow_drop_no_target=*/true,
/*allow_drop_no_target=*/true, /*lock_cursor=*/true));
/*lock_cursor=*/true));
} }
void TearDown() override { void TearDown() override {
......
...@@ -20,7 +20,6 @@ ...@@ -20,7 +20,6 @@
#include "base/task/post_task.h" #include "base/task/post_task.h"
#include "components/exo/data_source.h" #include "components/exo/data_source.h"
#include "components/exo/drag_drop_operation.h" #include "components/exo/drag_drop_operation.h"
#include "components/exo/extended_drag_source.h"
#include "components/exo/mime_utils.h" #include "components/exo/mime_utils.h"
#include "components/exo/seat_observer.h" #include "components/exo/seat_observer.h"
#include "components/exo/shell_surface_util.h" #include "components/exo/shell_surface_util.h"
...@@ -111,9 +110,8 @@ void Seat::StartDrag(DataSource* source, ...@@ -111,9 +110,8 @@ void Seat::StartDrag(DataSource* source,
Surface* icon, Surface* icon,
ui::mojom::DragEventSource event_source) { ui::mojom::DragEventSource event_source) {
// DragDropOperation manages its own lifetime. // DragDropOperation manages its own lifetime.
drag_drop_operation_ = drag_drop_operation_ = DragDropOperation::Create(
DragDropOperation::Create(source, origin, icon, last_pointer_location_, source, origin, icon, last_pointer_location_, event_source);
event_source, extended_drag_source_);
} }
void Seat::SetLastPointerLocation(const gfx::PointF& last_pointer_location) { void Seat::SetLastPointerLocation(const gfx::PointF& last_pointer_location) {
......
...@@ -31,7 +31,6 @@ class KeyEvent; ...@@ -31,7 +31,6 @@ class KeyEvent;
namespace exo { namespace exo {
class DragDropOperation; class DragDropOperation;
class ExtendedDragSource;
class ScopedDataSource; class ScopedDataSource;
class SeatObserver; class SeatObserver;
class Surface; class Surface;
...@@ -116,11 +115,6 @@ class Seat : public aura::client::FocusChangeObserver, ...@@ -116,11 +115,6 @@ class Seat : public aura::client::FocusChangeObserver,
void OnKeyboardLayoutNameChanged(const std::string& layout_name) override; void OnKeyboardLayoutNameChanged(const std::string& layout_name) override;
#endif #endif
void set_extended_drag_source(ExtendedDragSource* extended_drag_source) {
DCHECK(!extended_drag_source || !extended_drag_source_);
extended_drag_source_ = extended_drag_source;
}
void set_physical_code_for_currently_processing_event_for_testing( void set_physical_code_for_currently_processing_event_for_testing(
ui::DomCode physical_code_for_currently_processing_event) { ui::DomCode physical_code_for_currently_processing_event) {
physical_code_for_currently_processing_event_ = physical_code_for_currently_processing_event_ =
...@@ -190,8 +184,6 @@ class Seat : public aura::client::FocusChangeObserver, ...@@ -190,8 +184,6 @@ class Seat : public aura::client::FocusChangeObserver,
std::unique_ptr<XkbTracker> xkb_tracker_; std::unique_ptr<XkbTracker> xkb_tracker_;
#endif // defined(OS_CHROMEOS) #endif // defined(OS_CHROMEOS)
ExtendedDragSource* extended_drag_source_ = nullptr;
base::WeakPtrFactory<Seat> weak_ptr_factory_{this}; base::WeakPtrFactory<Seat> weak_ptr_factory_{this};
DISALLOW_COPY_AND_ASSIGN(Seat); DISALLOW_COPY_AND_ASSIGN(Seat);
......
...@@ -49,8 +49,6 @@ source_set("wayland") { ...@@ -49,8 +49,6 @@ source_set("wayland") {
"zaura_shell.h", "zaura_shell.h",
"zcr_alpha_compositing.cc", "zcr_alpha_compositing.cc",
"zcr_alpha_compositing.h", "zcr_alpha_compositing.h",
"zcr_extended_drag.cc",
"zcr_extended_drag.h",
"zcr_secure_output.cc", "zcr_secure_output.cc",
"zcr_secure_output.h", "zcr_secure_output.h",
"zcr_stylus.cc", "zcr_stylus.cc",
...@@ -156,6 +154,8 @@ source_set("wayland") { ...@@ -156,6 +154,8 @@ source_set("wayland") {
"zcr_color_space.h", "zcr_color_space.h",
"zcr_cursor_shapes.cc", "zcr_cursor_shapes.cc",
"zcr_cursor_shapes.h", "zcr_cursor_shapes.h",
"zcr_extended_drag.cc",
"zcr_extended_drag.h",
"zcr_gaming_input.cc", "zcr_gaming_input.cc",
"zcr_gaming_input.h", "zcr_gaming_input.h",
"zcr_keyboard_configuration.cc", "zcr_keyboard_configuration.cc",
......
...@@ -16,7 +16,6 @@ ...@@ -16,7 +16,6 @@
#include "components/exo/display.h" #include "components/exo/display.h"
#include "components/exo/extended_drag_offer.h" #include "components/exo/extended_drag_offer.h"
#include "components/exo/extended_drag_source.h" #include "components/exo/extended_drag_source.h"
#include "components/exo/seat.h"
#include "components/exo/surface.h" #include "components/exo/surface.h"
#include "components/exo/wayland/server_util.h" #include "components/exo/wayland/server_util.h"
#include "ui/gfx/geometry/vector2d.h" #include "ui/gfx/geometry/vector2d.h"
...@@ -144,7 +143,6 @@ void extended_drag_get_extended_drag_source(wl_client* client, ...@@ -144,7 +143,6 @@ void extended_drag_get_extended_drag_source(wl_client* client,
uint32_t id, uint32_t id,
wl_resource* data_source_resource, wl_resource* data_source_resource,
uint32_t settings) { uint32_t settings) {
Display* display = GetUserDataAs<Display>(resource);
DataSource* source = GetUserDataAs<DataSource>(data_source_resource); DataSource* source = GetUserDataAs<DataSource>(data_source_resource);
wl_resource* extended_drag_source_resource = wl_resource* extended_drag_source_resource =
...@@ -154,9 +152,8 @@ void extended_drag_get_extended_drag_source(wl_client* client, ...@@ -154,9 +152,8 @@ void extended_drag_get_extended_drag_source(wl_client* client,
SetImplementation(extended_drag_source_resource, SetImplementation(extended_drag_source_resource,
&extended_drag_source_implementation, &extended_drag_source_implementation,
std::make_unique<ExtendedDragSource>( std::make_unique<ExtendedDragSource>(
display->seat(), source, source, new ZcrExtendedDragSourceDelegate(
new ZcrExtendedDragSourceDelegate( extended_drag_source_resource, settings)));
extended_drag_source_resource, settings)));
} }
void extended_drag_get_extended_drag_offer(wl_client* client, void extended_drag_get_extended_drag_offer(wl_client* client,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment