blob: 73ae552d42ae13b943bd0793e3fde503088725e6 [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
dchengcedca5612016-04-09 01:40:158#include <memory>
[email protected]d7a2d892013-08-16 07:45:369#include <string>
10
avi1023d012015-12-25 02:39:1411#include "base/macros.h"
[email protected]d7a2d892013-08-16 07:45:3612#include "base/threading/thread.h"
13#include "content/common/content_export.h"
morritac6238ab2015-03-18 01:48:2914#include "content/common/in_process_child_thread_params.h"
[email protected]d7a2d892013-08-16 07:45:3615
16namespace content {
17class RenderProcess;
18
19// This class creates the IO thread for the renderer when running in
20// single-process mode. It's not used in multi-process mode.
[email protected]8707caa2013-09-04 16:41:3021class InProcessRendererThread : public base::Thread {
[email protected]d7a2d892013-08-16 07:45:3622 public:
morritac6238ab2015-03-18 01:48:2923 explicit InProcessRendererThread(const InProcessChildThreadParams& params);
dcheng6d18e402014-10-21 12:32:5224 ~InProcessRendererThread() override;
[email protected]d7a2d892013-08-16 07:45:3625
26 protected:
dcheng6d18e402014-10-21 12:32:5227 void Init() override;
28 void CleanUp() override;
[email protected]d7a2d892013-08-16 07:45:3629
30 private:
morritac6238ab2015-03-18 01:48:2931 InProcessChildThreadParams params_;
dchengcedca5612016-04-09 01:40:1532 std::unique_ptr<RenderProcess> render_process_;
[email protected]d7a2d892013-08-16 07:45:3633
[email protected]8707caa2013-09-04 16:41:3034 DISALLOW_COPY_AND_ASSIGN(InProcessRendererThread);
[email protected]d7a2d892013-08-16 07:45:3635};
36
[email protected]8707caa2013-09-04 16:41:3037CONTENT_EXPORT base::Thread* CreateInProcessRendererThread(
morritac6238ab2015-03-18 01:48:2938 const InProcessChildThreadParams& params);
[email protected]d7a2d892013-08-16 07:45:3639
40} // namespace content
41
[email protected]8707caa2013-09-04 16:41:3042#endif // CONTENT_RENDERER_IN_PROCESS_RENDERER_THREAD_H_