wayland_extension.cc 856 B

123456789101112131415161718192021222324252627
  1. // Copyright 2020 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/extensions/wayland_extension.h"
  5. #include "ui/base/class_property.h"
  6. #include "ui/platform_window/platform_window.h"
  7. DEFINE_UI_CLASS_PROPERTY_TYPE(ui::WaylandExtension*)
  8. namespace ui {
  9. DEFINE_UI_CLASS_PROPERTY_KEY(WaylandExtension*, kWaylandExtensionKey, nullptr)
  10. WaylandExtension::~WaylandExtension() = default;
  11. void WaylandExtension::SetWaylandExtension(PlatformWindow* window,
  12. WaylandExtension* extension) {
  13. window->SetProperty(kWaylandExtensionKey, extension);
  14. }
  15. WaylandExtension* GetWaylandExtension(const PlatformWindow& window) {
  16. return window.GetProperty(kWaylandExtensionKey);
  17. }
  18. } // namespace ui