Commit 2c8bc0f8 authored by Nick Diego Yamane's avatar Nick Diego Yamane Committed by Commit Bot

exo: Clean up DragDropOperation's surface/datasource callbacks

No functional change, just a minor cleanup.

R=oshima@chromium.org

Bug: 1099418
Change-Id: Iceb8ee9d87b62d7428972e9327be7d1930837e62
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2519482Reviewed-by: default avatarMitsuru Oshima <oshima@chromium.org>
Commit-Queue: Nick Yamane <nickdiego@igalia.com>
Cr-Commit-Position: refs/heads/master@{#824020}
parent 46ed48a5
......@@ -5,6 +5,7 @@
#include "components/exo/drag_drop_operation.h"
#include "base/barrier_closure.h"
#include "base/check.h"
#include "base/threading/sequenced_task_runner_handle.h"
#include "components/exo/data_offer.h"
#include "components/exo/data_source.h"
......@@ -332,19 +333,13 @@ void DragDropOperation::OnExtendedDragSourceDestroying(
}
void DragDropOperation::OnSurfaceDestroying(Surface* surface) {
if (surface == origin_->get() || surface == icon_->get()) {
delete this;
} else {
NOTREACHED();
}
DCHECK(surface == origin_->get() || surface == icon_->get());
delete this;
}
void DragDropOperation::OnDataSourceDestroying(DataSource* source) {
if (source == source_->get()) {
ResetSource();
delete this;
} else {
NOTREACHED();
}
DCHECK_EQ(source, source_->get());
ResetSource();
delete this;
}
} // namespace exo
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