wm_drop_handler.cc 772 B

12345678910111213141516171819202122232425
  1. // Copyright 2019 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/platform_window/wm/wm_drop_handler.h"
  5. #include "ui/base/class_property.h"
  6. #include "ui/platform_window/platform_window.h"
  7. DEFINE_UI_CLASS_PROPERTY_TYPE(ui::WmDropHandler*)
  8. namespace ui {
  9. DEFINE_UI_CLASS_PROPERTY_KEY(WmDropHandler*, kWmDropHandlerKey, nullptr)
  10. void SetWmDropHandler(PlatformWindow* platform_window,
  11. WmDropHandler* drop_handler) {
  12. platform_window->SetProperty(kWmDropHandlerKey, drop_handler);
  13. }
  14. WmDropHandler* GetWmDropHandler(const PlatformWindow& platform_window) {
  15. return platform_window.GetProperty(kWmDropHandlerKey);
  16. }
  17. } // namespace ui