io_thread.h 808 B

12345678910111213141516171819202122232425262728293031323334353637
  1. // Copyright (c) 2017 GitHub, Inc.
  2. // Use of this source code is governed by the MIT license that can be
  3. // found in the LICENSE file.
  4. #ifndef BRIGHTRAY_BROWSER_IO_THREAD_H_
  5. #define BRIGHTRAY_BROWSER_IO_THREAD_H_
  6. #include <memory>
  7. #include "base/macros.h"
  8. #include "content/public/browser/browser_thread_delegate.h"
  9. namespace net {
  10. class URLRequestContext;
  11. }
  12. namespace brightray {
  13. class IOThread : public content::BrowserThreadDelegate {
  14. public:
  15. IOThread();
  16. ~IOThread() override;
  17. protected:
  18. // BrowserThreadDelegate Implementation, runs on the IO thread.
  19. void Init() override;
  20. void CleanUp() override;
  21. private:
  22. std::unique_ptr<net::URLRequestContext> url_request_context_;
  23. DISALLOW_COPY_AND_ASSIGN(IOThread);
  24. };
  25. } // namespace brightray
  26. #endif // BRIGHTRAY_BROWSER_IO_THREAD_H_