Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(431)

Side by Side Diff: content/renderer/render_process_impl.h

Issue 2798623002: Use TaskScheduler::InitParams to initialize TaskScheduler in child processes. (Closed)
Patch Set: Created 3 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « content/renderer/render_process.cc ('k') | content/renderer/render_process_impl.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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> 8 #include <memory>
9 #include <vector> 9 #include <vector>
10 10
11 #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" 12 #include "base/task_scheduler/task_scheduler.h"
14 #include "content/renderer/render_process.h" 13 #include "content/renderer/render_process.h"
15 14
16 namespace content { 15 namespace content {
17 16
18 // Implementation of the RenderProcess interface for the regular browser. 17 // Implementation of the RenderProcess interface for the regular browser.
19 // See also MockRenderProcess which implements the active "RenderProcess" when 18 // See also MockRenderProcess which implements the active "RenderProcess" when
20 // running under certain unit tests. 19 // running under certain unit tests.
21 class RenderProcessImpl : public RenderProcess { 20 class RenderProcessImpl : public RenderProcess {
22 public: 21 public:
23 ~RenderProcessImpl() override; 22 ~RenderProcessImpl() override;
24 23
25 // Creates and returns a RenderProcessImpl instance. 24 // Creates and returns a RenderProcessImpl instance.
26 // 25 //
27 // RenderProcessImpl is created via a static method instead of a simple 26 // RenderProcessImpl is created via a static method instead of a simple
28 // constructor because non-trivial calls must be made to get the arguments 27 // constructor because non-trivial calls must be made to get the arguments
29 // required by constructor of the base class. 28 // required by constructor of the base class.
30 static std::unique_ptr<RenderProcess> Create(); 29 static std::unique_ptr<RenderProcess> Create();
31 30
32 // RenderProcess implementation. 31 // RenderProcess implementation.
33 void AddBindings(int bindings) override; 32 void AddBindings(int bindings) override;
34 int GetEnabledBindings() const override; 33 int GetEnabledBindings() const override;
35 34
36 private: 35 private:
37 RenderProcessImpl( 36 RenderProcessImpl(std::unique_ptr<base::TaskScheduler::InitParams>
38 const std::vector<base::SchedulerWorkerPoolParams>& worker_pool_params, 37 task_scheduler_init_params);
39 base::TaskScheduler::WorkerPoolIndexForTraitsCallback
40 worker_pool_index_for_traits_callback);
41 38
42 // Bitwise-ORed set of extra bindings that have been enabled anywhere in this 39 // Bitwise-ORed set of extra bindings that have been enabled anywhere in this
43 // process. See BindingsPolicy for details. 40 // process. See BindingsPolicy for details.
44 int enabled_bindings_; 41 int enabled_bindings_;
45 42
46 DISALLOW_COPY_AND_ASSIGN(RenderProcessImpl); 43 DISALLOW_COPY_AND_ASSIGN(RenderProcessImpl);
47 }; 44 };
48 45
49 } // namespace content 46 } // namespace content
50 47
51 #endif // CONTENT_RENDERER_RENDER_PROCESS_IMPL_H_ 48 #endif // CONTENT_RENDERER_RENDER_PROCESS_IMPL_H_
OLDNEW
« no previous file with comments | « content/renderer/render_process.cc ('k') | content/renderer/render_process_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698