OLD | NEW |
---|---|
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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_RENDER_PROCESS_IMPL_H_ | 5 #ifndef CONTENT_RENDERER_RENDER_PROCESS_IMPL_H_ |
6 #define CONTENT_RENDERER_RENDER_PROCESS_IMPL_H_ | 6 #define CONTENT_RENDERER_RENDER_PROCESS_IMPL_H_ |
7 | 7 |
8 #include <memory> | |
9 #include <vector> | |
10 | |
8 #include "base/macros.h" | 11 #include "base/macros.h" |
12 #include "base/task_scheduler/scheduler_worker_pool_params.h" | |
13 #include "base/task_scheduler/task_scheduler.h" | |
9 #include "content/renderer/render_process.h" | 14 #include "content/renderer/render_process.h" |
10 | 15 |
11 namespace content { | 16 namespace content { |
12 | 17 |
13 // Implementation of the RenderProcess interface for the regular browser. | 18 // Implementation of the RenderProcess interface for the regular browser. |
14 // See also MockRenderProcess which implements the active "RenderProcess" when | 19 // See also MockRenderProcess which implements the active "RenderProcess" when |
15 // running under certain unit tests. | 20 // running under certain unit tests. |
16 class RenderProcessImpl : public RenderProcess { | 21 class RenderProcessImpl : public RenderProcess { |
17 public: | 22 public: |
18 RenderProcessImpl(); | |
19 ~RenderProcessImpl() override; | 23 ~RenderProcessImpl() override; |
20 | 24 |
25 static std::unique_ptr<RenderProcess> Create(); | |
gab
2017/02/09 17:43:45
Explain here why a static Create is required (i.e.
fdoray
2017/02/10 18:47:11
Done.
| |
26 | |
21 // RenderProcess implementation. | 27 // RenderProcess implementation. |
22 void AddBindings(int bindings) override; | 28 void AddBindings(int bindings) override; |
23 int GetEnabledBindings() const override; | 29 int GetEnabledBindings() const override; |
24 | 30 |
25 private: | 31 private: |
26 void InitializeTaskScheduler() override; | 32 RenderProcessImpl( |
33 const std::vector<base::SchedulerWorkerPoolParams>& worker_pool_params, | |
34 base::TaskScheduler::WorkerPoolIndexForTraitsCallback | |
35 worker_pool_index_for_traits_callback); | |
27 | 36 |
28 // Bitwise-ORed set of extra bindings that have been enabled anywhere in this | 37 // Bitwise-ORed set of extra bindings that have been enabled anywhere in this |
29 // process. See BindingsPolicy for details. | 38 // process. See BindingsPolicy for details. |
30 int enabled_bindings_; | 39 int enabled_bindings_; |
31 | 40 |
32 DISALLOW_COPY_AND_ASSIGN(RenderProcessImpl); | 41 DISALLOW_COPY_AND_ASSIGN(RenderProcessImpl); |
33 }; | 42 }; |
34 | 43 |
35 } // namespace content | 44 } // namespace content |
36 | 45 |
37 #endif // CONTENT_RENDERER_RENDER_PROCESS_IMPL_H_ | 46 #endif // CONTENT_RENDERER_RENDER_PROCESS_IMPL_H_ |
OLD | NEW |