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

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

Issue 2687903003: Add TaskScheduler initialization arguments to ChildProcess. (Closed)
Patch Set: default Created 3 years, 10 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>
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 // Creates and returns a RenderProcessImpl instance.
26 //
27 // RenderProcessImpl is created via a static method instead of a simple
28 // constructor because non-trivial calls must be made to get the arguments
29 // required by constructor of the base class.
30 static std::unique_ptr<RenderProcess> Create();
31
21 // RenderProcess implementation. 32 // RenderProcess implementation.
22 void AddBindings(int bindings) override; 33 void AddBindings(int bindings) override;
23 int GetEnabledBindings() const override; 34 int GetEnabledBindings() const override;
24 35
25 private: 36 private:
26 void InitializeTaskScheduler() override; 37 RenderProcessImpl(
38 const std::vector<base::SchedulerWorkerPoolParams>& worker_pool_params,
39 base::TaskScheduler::WorkerPoolIndexForTraitsCallback
40 worker_pool_index_for_traits_callback);
27 41
28 // Bitwise-ORed set of extra bindings that have been enabled anywhere in this 42 // Bitwise-ORed set of extra bindings that have been enabled anywhere in this
29 // process. See BindingsPolicy for details. 43 // process. See BindingsPolicy for details.
30 int enabled_bindings_; 44 int enabled_bindings_;
31 45
32 DISALLOW_COPY_AND_ASSIGN(RenderProcessImpl); 46 DISALLOW_COPY_AND_ASSIGN(RenderProcessImpl);
33 }; 47 };
34 48
35 } // namespace content 49 } // namespace content
36 50
37 #endif // CONTENT_RENDERER_RENDER_PROCESS_IMPL_H_ 51 #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