#include "ui/views/widget/drop_helper.h"
#include <memory>
#include <set>
#include <utility>
#include "base/functional/bind.h"
#include "base/functional/callback.h"
#include "base/functional/callback_helpers.h"
#include "base/no_destructor.h"
#include "build/build_config.h"
#include "ui/base/dragdrop/drag_drop_types.h"
#include "ui/base/dragdrop/mojom/drag_drop_types.mojom.h"
#include "ui/compositor/layer_tree_owner.h"
#include "ui/views/view.h"
#include "ui/views/widget/widget.h"
namespace views {
namespace {
DragOperation;
const View* g_drag_entered_callback_view = …;
base::RepeatingClosure* GetDragEnteredCallback() { … }
}
DropHelper::DropHelper(View* root_view) : … { … }
DropHelper::~DropHelper() = default;
void DropHelper::SetDragEnteredCallbackForTesting(
const View* view,
base::RepeatingClosure callback) { … }
void DropHelper::ResetTargetViewIfEquals(View* view) { … }
int DropHelper::OnDragOver(const OSExchangeData& data,
const gfx::Point& root_view_location,
int drag_operation) { … }
void DropHelper::OnDragExit() { … }
DragOperation DropHelper::OnDrop(const OSExchangeData& data,
const gfx::Point& root_view_location,
int drag_operation) { … }
DropHelper::DropCallback DropHelper::GetDropCallback(
const OSExchangeData& data,
const gfx::Point& root_view_location,
int drag_operation) { … }
View* DropHelper::CalculateTargetView(const gfx::Point& root_view_location,
const OSExchangeData& data,
bool check_can_drop) { … }
View* DropHelper::CalculateTargetViewImpl(const gfx::Point& root_view_location,
const OSExchangeData& data,
bool check_can_drop,
raw_ptr<View>* deepest_view) { … }
void DropHelper::NotifyDragEntered(const OSExchangeData& data,
const gfx::Point& root_view_location,
int drag_operation) { … }
int DropHelper::NotifyDragOver(const OSExchangeData& data,
const gfx::Point& root_view_location,
int drag_operation) { … }
void DropHelper::NotifyDragExit() { … }
}