x11_extension.cc 840 B

123456789101112131415161718192021222324252627
  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/extensions/x11_extension.h"
  5. #include "ui/base/class_property.h"
  6. #include "ui/platform_window/platform_window.h"
  7. DEFINE_UI_CLASS_PROPERTY_TYPE(ui::X11Extension*)
  8. namespace ui {
  9. DEFINE_UI_CLASS_PROPERTY_KEY(X11Extension*, kX11ExtensionKey, nullptr)
  10. X11Extension::~X11Extension() = default;
  11. void X11Extension::SetX11Extension(PlatformWindow* platform_window,
  12. X11Extension* x11_extension) {
  13. platform_window->SetProperty(kX11ExtensionKey, x11_extension);
  14. }
  15. X11Extension* GetX11Extension(const PlatformWindow& platform_window) {
  16. return platform_window.GetProperty(kX11ExtensionKey);
  17. }
  18. } // namespace ui