blob: 115616065a371ab4780e171e10d24fa7d2bcef38 [file] [log] [blame]
[email protected]d7a2d892013-08-16 07:45:361// Copyright 2013 The Chromium Authors. All rights reserved.
2// Use of this source code is governed by a BSD-style license that can be
3// found in the LICENSE file.
4
[email protected]8707caa2013-09-04 16:41:305#ifndef CONTENT_RENDERER_IN_PROCESS_RENDERER_THREAD_H_
6#define CONTENT_RENDERER_IN_PROCESS_RENDERER_THREAD_H_
[email protected]d7a2d892013-08-16 07:45:367
8#include <string>
9
10#include "base/threading/thread.h"
11#include "content/common/content_export.h"
morritac6238ab2015-03-18 01:48:2912#include "content/common/in_process_child_thread_params.h"
[email protected]d7a2d892013-08-16 07:45:3613
14namespace content {
15class RenderProcess;
16
17// This class creates the IO thread for the renderer when running in
18// single-process mode. It's not used in multi-process mode.
[email protected]8707caa2013-09-04 16:41:3019class InProcessRendererThread : public base::Thread {
[email protected]d7a2d892013-08-16 07:45:3620 public:
morritac6238ab2015-03-18 01:48:2921 explicit InProcessRendererThread(const InProcessChildThreadParams& params);
dcheng6d18e402014-10-21 12:32:5222 ~InProcessRendererThread() override;
[email protected]d7a2d892013-08-16 07:45:3623
24 protected:
dcheng6d18e402014-10-21 12:32:5225 void Init() override;
26 void CleanUp() override;
[email protected]d7a2d892013-08-16 07:45:3627
28 private:
morritac6238ab2015-03-18 01:48:2929 InProcessChildThreadParams params_;
[email protected]d7a2d892013-08-16 07:45:3630 scoped_ptr<RenderProcess> render_process_;
31
[email protected]8707caa2013-09-04 16:41:3032 DISALLOW_COPY_AND_ASSIGN(InProcessRendererThread);
[email protected]d7a2d892013-08-16 07:45:3633};
34
[email protected]8707caa2013-09-04 16:41:3035CONTENT_EXPORT base::Thread* CreateInProcessRendererThread(
morritac6238ab2015-03-18 01:48:2936 const InProcessChildThreadParams& params);
[email protected]d7a2d892013-08-16 07:45:3637
38} // namespace content
39
[email protected]8707caa2013-09-04 16:41:3040#endif // CONTENT_RENDERER_IN_PROCESS_RENDERER_THREAD_H_