OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 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 | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #ifndef CONTENT_RENDERER_IN_PROCESS_RENDERER_THREAD_H_ | 5 #ifndef CONTENT_RENDERER_IN_PROCESS_RENDERER_THREAD_H_ |
6 #define CONTENT_RENDERER_IN_PROCESS_RENDERER_THREAD_H_ | 6 #define CONTENT_RENDERER_IN_PROCESS_RENDERER_THREAD_H_ |
7 | 7 |
| 8 #include <memory> |
8 #include <string> | 9 #include <string> |
9 | 10 |
10 #include "base/macros.h" | 11 #include "base/macros.h" |
11 #include "base/memory/scoped_ptr.h" | |
12 #include "base/threading/thread.h" | 12 #include "base/threading/thread.h" |
13 #include "content/common/content_export.h" | 13 #include "content/common/content_export.h" |
14 #include "content/common/in_process_child_thread_params.h" | 14 #include "content/common/in_process_child_thread_params.h" |
15 | 15 |
16 namespace content { | 16 namespace content { |
17 class RenderProcess; | 17 class RenderProcess; |
18 | 18 |
19 // This class creates the IO thread for the renderer when running in | 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. | 20 // single-process mode. It's not used in multi-process mode. |
21 class InProcessRendererThread : public base::Thread { | 21 class InProcessRendererThread : public base::Thread { |
22 public: | 22 public: |
23 explicit InProcessRendererThread(const InProcessChildThreadParams& params); | 23 explicit InProcessRendererThread(const InProcessChildThreadParams& params); |
24 ~InProcessRendererThread() override; | 24 ~InProcessRendererThread() override; |
25 | 25 |
26 protected: | 26 protected: |
27 void Init() override; | 27 void Init() override; |
28 void CleanUp() override; | 28 void CleanUp() override; |
29 | 29 |
30 private: | 30 private: |
31 InProcessChildThreadParams params_; | 31 InProcessChildThreadParams params_; |
32 scoped_ptr<RenderProcess> render_process_; | 32 std::unique_ptr<RenderProcess> render_process_; |
33 | 33 |
34 DISALLOW_COPY_AND_ASSIGN(InProcessRendererThread); | 34 DISALLOW_COPY_AND_ASSIGN(InProcessRendererThread); |
35 }; | 35 }; |
36 | 36 |
37 CONTENT_EXPORT base::Thread* CreateInProcessRendererThread( | 37 CONTENT_EXPORT base::Thread* CreateInProcessRendererThread( |
38 const InProcessChildThreadParams& params); | 38 const InProcessChildThreadParams& params); |
39 | 39 |
40 } // namespace content | 40 } // namespace content |
41 | 41 |
42 #endif // CONTENT_RENDERER_IN_PROCESS_RENDERER_THREAD_H_ | 42 #endif // CONTENT_RENDERER_IN_PROCESS_RENDERER_THREAD_H_ |
OLD | NEW |