blob: 316d4ea889fb23ffb331a2dc6d21df7f9f9b25fc (
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
|
// Copyright 2022 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/gfx/x/future.h"
namespace x11 {
FutureBase::FutureBase() = default;
FutureBase::FutureBase(std::unique_ptr<Connection::FutureImpl> impl)
: impl_(std::move(impl)) {}
FutureBase::FutureBase(FutureBase&&) = default;
FutureBase& FutureBase::operator=(FutureBase&&) = default;
FutureBase::~FutureBase() = default;
void FutureBase::Wait() {
if (impl_)
impl_->Wait();
}
void FutureBase::DispatchNow() {
if (impl_)
impl_->DispatchNow();
}
bool FutureBase::AfterEvent(const Event& event) const {
return impl_ ? impl_->AfterEvent(event) : false;
}
} // namespace x11
|