summaryrefslogtreecommitdiff
path: root/chromium/ui/linux/linux_ui_delegate.cc
blob: b08d78022f843b0309513e7c895b4ebfbd2f464d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
// Copyright 2021 The Chromium Authors
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

#include "ui/linux/linux_ui_delegate.h"

#include "base/callback.h"
#include "base/notreached.h"

namespace ui {

// static
LinuxUiDelegate* LinuxUiDelegate::instance_ = nullptr;

// static
LinuxUiDelegate* LinuxUiDelegate::GetInstance() {
  return instance_;
}

LinuxUiDelegate::LinuxUiDelegate() {
  DCHECK(!instance_);
  instance_ = this;
}

LinuxUiDelegate::~LinuxUiDelegate() {
  DCHECK_EQ(instance_, this);
  instance_ = nullptr;
}

bool LinuxUiDelegate::ExportWindowHandle(
    uint32_t parent_widget,
    base::OnceCallback<void(const std::string&)> callback) {
  // This function should not be called when using a platform that doesn't
  // implement it.
  NOTREACHED();
  return false;
}

void LinuxUiDelegate::SetTransientWindowForParent(
    gfx::AcceleratedWidget parent,
    gfx::AcceleratedWidget transient) {
  // This function should not be called when using a platform that doesn't
  // implement it.
  NOTREACHED();
}

}  // namespace ui