drop_target_event.cc 1.1 KB

123456789101112131415161718192021222324252627282930313233343536
  1. // Copyright (c) 2013 The Chromium Authors. All rights reserved.
  2. // Use of this source code is governed by a BSD-style license that can be
  3. // found in the LICENSE file.
  4. #include "ui/base/dragdrop/drop_target_event.h"
  5. #include "ui/events/event_utils.h"
  6. namespace ui {
  7. ////////////////////////////////////////////////////////////////////////////////
  8. // DropTargetEvent
  9. DropTargetEvent::DropTargetEvent(const OSExchangeData& data,
  10. const gfx::PointF& location,
  11. const gfx::PointF& root_location,
  12. int source_operations)
  13. : LocatedEvent(ET_DROP_TARGET_EVENT,
  14. location,
  15. root_location,
  16. EventTimeForNow(),
  17. 0),
  18. data_(data),
  19. source_operations_(source_operations) {}
  20. DropTargetEvent::DropTargetEvent(const DropTargetEvent& other)
  21. : LocatedEvent(other),
  22. data_(other.data_),
  23. source_operations_(other.source_operations_) {}
  24. std::unique_ptr<Event> DropTargetEvent::Clone() const {
  25. return std::make_unique<DropTargetEvent>(*this);
  26. }
  27. } // namespace ui