[email protected] | d7a2d89 | 2013-08-16 07:45:36 | [diff] [blame] | 1 | // 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] | 8707caa | 2013-09-04 16:41:30 | [diff] [blame] | 5 | #ifndef CONTENT_RENDERER_IN_PROCESS_RENDERER_THREAD_H_ |
6 | #define CONTENT_RENDERER_IN_PROCESS_RENDERER_THREAD_H_ | ||||
[email protected] | d7a2d89 | 2013-08-16 07:45:36 | [diff] [blame] | 7 | |
dcheng | cedca561 | 2016-04-09 01:40:15 | [diff] [blame] | 8 | #include <memory> |
[email protected] | d7a2d89 | 2013-08-16 07:45:36 | [diff] [blame] | 9 | #include <string> |
10 | |||||
avi | 1023d01 | 2015-12-25 02:39:14 | [diff] [blame] | 11 | #include "base/macros.h" |
[email protected] | d7a2d89 | 2013-08-16 07:45:36 | [diff] [blame] | 12 | #include "base/threading/thread.h" |
13 | #include "content/common/content_export.h" | ||||
morrita | c6238ab | 2015-03-18 01:48:29 | [diff] [blame] | 14 | #include "content/common/in_process_child_thread_params.h" |
[email protected] | d7a2d89 | 2013-08-16 07:45:36 | [diff] [blame] | 15 | |
16 | namespace content { | ||||
17 | class 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] | 8707caa | 2013-09-04 16:41:30 | [diff] [blame] | 21 | class InProcessRendererThread : public base::Thread { |
[email protected] | d7a2d89 | 2013-08-16 07:45:36 | [diff] [blame] | 22 | public: |
morrita | c6238ab | 2015-03-18 01:48:29 | [diff] [blame] | 23 | explicit InProcessRendererThread(const InProcessChildThreadParams& params); |
dcheng | 6d18e40 | 2014-10-21 12:32:52 | [diff] [blame] | 24 | ~InProcessRendererThread() override; |
[email protected] | d7a2d89 | 2013-08-16 07:45:36 | [diff] [blame] | 25 | |
26 | protected: | ||||
dcheng | 6d18e40 | 2014-10-21 12:32:52 | [diff] [blame] | 27 | void Init() override; |
28 | void CleanUp() override; | ||||
[email protected] | d7a2d89 | 2013-08-16 07:45:36 | [diff] [blame] | 29 | |
30 | private: | ||||
morrita | c6238ab | 2015-03-18 01:48:29 | [diff] [blame] | 31 | InProcessChildThreadParams params_; |
dcheng | cedca561 | 2016-04-09 01:40:15 | [diff] [blame] | 32 | std::unique_ptr<RenderProcess> render_process_; |
[email protected] | d7a2d89 | 2013-08-16 07:45:36 | [diff] [blame] | 33 | |
[email protected] | 8707caa | 2013-09-04 16:41:30 | [diff] [blame] | 34 | DISALLOW_COPY_AND_ASSIGN(InProcessRendererThread); |
[email protected] | d7a2d89 | 2013-08-16 07:45:36 | [diff] [blame] | 35 | }; |
36 | |||||
[email protected] | 8707caa | 2013-09-04 16:41:30 | [diff] [blame] | 37 | CONTENT_EXPORT base::Thread* CreateInProcessRendererThread( |
morrita | c6238ab | 2015-03-18 01:48:29 | [diff] [blame] | 38 | const InProcessChildThreadParams& params); |
[email protected] | d7a2d89 | 2013-08-16 07:45:36 | [diff] [blame] | 39 | |
40 | } // namespace content | ||||
41 | |||||
[email protected] | 8707caa | 2013-09-04 16:41:30 | [diff] [blame] | 42 | #endif // CONTENT_RENDERER_IN_PROCESS_RENDERER_THREAD_H_ |