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

Side by Side Diff: content/renderer/render_process.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/in_process_renderer_thread.cc ('k') | content/renderer/render_process.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_H_ 5 #ifndef CONTENT_RENDERER_RENDER_PROCESS_H_
6 #define CONTENT_RENDERER_RENDER_PROCESS_H_ 6 #define CONTENT_RENDERER_RENDER_PROCESS_H_
7 7
8 #include <vector>
9
8 #include "base/macros.h" 10 #include "base/macros.h"
11 #include "base/task_scheduler/scheduler_worker_pool_params.h"
12 #include "base/task_scheduler/task_scheduler.h"
9 #include "content/child/child_process.h" 13 #include "content/child/child_process.h"
10 14
11 namespace content { 15 namespace content {
12 16
13 // A abstract interface representing the renderer end of the browser<->renderer 17 // A abstract interface representing the renderer end of the browser<->renderer
14 // connection. The opposite end is the RenderProcessHost. This is a singleton 18 // connection. The opposite end is the RenderProcessHost. This is a singleton
15 // object for each renderer. 19 // object for each renderer.
16 // 20 //
17 // RenderProcessImpl implements this interface for the regular browser. 21 // RenderProcessImpl implements this interface for the regular browser.
18 // MockRenderProcess implements this interface for certain tests, especially 22 // MockRenderProcess implements this interface for certain tests, especially
19 // ones derived from RenderViewTest. 23 // ones derived from RenderViewTest.
20 class RenderProcess : public ChildProcess { 24 class RenderProcess : public ChildProcess {
21 public: 25 public:
22 RenderProcess() {} 26 RenderProcess() = default;
27 RenderProcess(
28 const std::vector<base::SchedulerWorkerPoolParams>& worker_pool_params,
29 base::TaskScheduler::WorkerPoolIndexForTraitsCallback
30 worker_pool_index_for_traits_callback);
23 ~RenderProcess() override {} 31 ~RenderProcess() override {}
24 32
25 // Keep track of the cumulative set of enabled bindings for this process, 33 // Keep track of the cumulative set of enabled bindings for this process,
26 // across any view. 34 // across any view.
27 virtual void AddBindings(int bindings) = 0; 35 virtual void AddBindings(int bindings) = 0;
28 36
29 // The cumulative set of enabled bindings for this process. 37 // The cumulative set of enabled bindings for this process.
30 virtual int GetEnabledBindings() const = 0; 38 virtual int GetEnabledBindings() const = 0;
31 39
32 // Returns a pointer to the RenderProcess singleton instance. Assuming that 40 // Returns a pointer to the RenderProcess singleton instance. Assuming that
33 // we're actually a renderer or a renderer test, this static cast will 41 // we're actually a renderer or a renderer test, this static cast will
34 // be correct. 42 // be correct.
35 static RenderProcess* current() { 43 static RenderProcess* current() {
36 return static_cast<RenderProcess*>(ChildProcess::current()); 44 return static_cast<RenderProcess*>(ChildProcess::current());
37 } 45 }
38 46
39 private: 47 private:
40 DISALLOW_COPY_AND_ASSIGN(RenderProcess); 48 DISALLOW_COPY_AND_ASSIGN(RenderProcess);
41 }; 49 };
42 50
43 } // namespace content 51 } // namespace content
44 52
45 #endif // CONTENT_RENDERER_RENDER_PROCESS_H_ 53 #endif // CONTENT_RENDERER_RENDER_PROCESS_H_
OLDNEW
« no previous file with comments | « content/renderer/in_process_renderer_thread.cc ('k') | content/renderer/render_process.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698