linux_ui_delegate.cc 1.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  1. // Copyright 2021 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/linux/linux_ui_delegate.h"
  5. #include "base/callback.h"
  6. #include "base/notreached.h"
  7. namespace ui {
  8. // static
  9. LinuxUiDelegate* LinuxUiDelegate::instance_ = nullptr;
  10. // static
  11. LinuxUiDelegate* LinuxUiDelegate::GetInstance() {
  12. return instance_;
  13. }
  14. LinuxUiDelegate::LinuxUiDelegate() {
  15. DCHECK(!instance_);
  16. instance_ = this;
  17. }
  18. LinuxUiDelegate::~LinuxUiDelegate() {
  19. DCHECK_EQ(instance_, this);
  20. instance_ = nullptr;
  21. }
  22. bool LinuxUiDelegate::ExportWindowHandle(
  23. uint32_t parent_widget,
  24. base::OnceCallback<void(const std::string&)> callback) {
  25. // This function should not be called when using a platform that doesn't
  26. // implement it.
  27. NOTREACHED();
  28. return false;
  29. }
  30. void LinuxUiDelegate::SetTransientWindowForParent(
  31. gfx::AcceleratedWidget parent,
  32. gfx::AcceleratedWidget transient) {
  33. // This function should not be called when using a platform that doesn't
  34. // implement it.
  35. NOTREACHED();
  36. }
  37. } // namespace ui