chromium/base/tracing/perfetto_task_runner.h

// Copyright 2018 The Chromium Authors
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

#ifndef BASE_TRACING_PERFETTO_TASK_RUNNER_H_
#define BASE_TRACING_PERFETTO_TASK_RUNNER_H_

#include "base/base_export.h"
#include "base/cancelable_callback.h"
#include "base/synchronization/lock.h"
#include "base/task/sequenced_task_runner.h"
#include "base/timer/timer.h"
#include "build/build_config.h"
#include "third_party/perfetto/include/perfetto/base/task_runner.h"

#if (BUILDFLAG(IS_POSIX) && !BUILDFLAG(IS_NACL)) || BUILDFLAG(IS_FUCHSIA)
// Needed for base::FileDescriptorWatcher::Controller and for implementing
// AddFileDescriptorWatch & RemoveFileDescriptorWatch.
#include <map>
#include "base/files/file_descriptor_watcher_posix.h"
#endif  // (BUILDFLAG(IS_POSIX) && !BUILDFLAG(IS_NACL)) || BUILDFLAG(IS_FUCHSIA)

namespace base {
namespace tracing {

// This wraps a base::TaskRunner implementation to be able
// to provide it to Perfetto.
class BASE_EXPORT PerfettoTaskRunner : public perfetto::base::TaskRunner {};

}  // namespace tracing
}  // namespace base

#endif  // BASE_TRACING_PERFETTO_TASK_RUNNER_H_