// Copyright 2012 The Chromium Authors // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. #ifndef CONTENT_BROWSER_BROWSER_THREAD_IMPL_H_ #define CONTENT_BROWSER_BROWSER_THREAD_IMPL_H_ #include "base/memory/scoped_refptr.h" #include "base/task/single_thread_task_runner.h" #include "build/build_config.h" #include "content/common/content_export.h" #include "content/public/browser/browser_thread.h" #if BUILDFLAG(IS_POSIX) #include <optional> #include "base/files/file_descriptor_watcher_posix.h" #endif namespace content { class BrowserMainLoop; class BrowserProcessIOThread; class TestBrowserThread; // BrowserThreadImpl is a scoped object which maps a SingleThreadTaskRunner to a // BrowserThread::ID. On ~BrowserThreadImpl() that ID enters a SHUTDOWN state // (in which BrowserThread::IsThreadInitialized() returns false) but the mapping // isn't undone to avoid shutdown races (the task runner is free to stop // accepting tasks by then however). // // Very few users should use this directly. To mock BrowserThreads, tests should // use BrowserTaskEnvironment instead. class CONTENT_EXPORT BrowserThreadImpl : public BrowserThread { … }; } // namespace content #endif // CONTENT_BROWSER_BROWSER_THREAD_IMPL_H_