/* * Copyright (C) 2019 The Android Open Source Project * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ #ifndef INCLUDE_PERFETTO_TRACING_PLATFORM_H_ #define INCLUDE_PERFETTO_TRACING_PLATFORM_H_ #include <stddef.h> #include <stdint.h> #include <functional> #include <memory> #include <string> #include "perfetto/base/export.h" #include "perfetto/base/logging.h" #include "perfetto/base/proc_utils.h" #include "perfetto/base/thread_utils.h" #include "perfetto/tracing/tracing.h" namespace perfetto { namespace base { class TaskRunner; } // namespace base // This abstract class is used to abstract dependencies on platform-specific // primitives that cannot be implemented by the perfetto codebase and must be // provided or overridden by the embedder. // This is, for instance, for cases where we want to use some particular // base:: class in Chrome and provide instead POSIX fallbacks for other // embedders. // Base class for thread-local objects. This is to get a basic object vtable and // delegate destruction to the embedder. See Platform::CreateThreadLocalObject. class PERFETTO_EXPORT_COMPONENT PlatformThreadLocalObject { … }; class PERFETTO_EXPORT_COMPONENT Platform { … }; } // namespace perfetto #endif // INCLUDE_PERFETTO_TRACING_PLATFORM_H_