blob: 289da706b8ed003ae23d13f5b62950799e1eb029 [file] [log] [blame]
[email protected]744c2a22012-03-15 18:42:041// Copyright (c) 2012 The Chromium Authors. All rights reserved.
license.botbf09a502008-08-24 00:55:552// Use of this source code is governed by a BSD-style license that can be
3// found in the LICENSE file.
initial.commit09911bf2008-07-26 23:55:294
[email protected]8704f89b2011-04-15 00:30:055#ifndef CONTENT_RENDERER_RENDER_PROCESS_H_
6#define CONTENT_RENDERER_RENDER_PROCESS_H_
initial.commit09911bf2008-07-26 23:55:297
avi1023d012015-12-25 02:39:148#include "base/macros.h"
[email protected]10208ea2013-06-06 20:08:039#include "content/child/child_process.h"
[email protected]39008c02009-02-11 23:59:2510
[email protected]eb398192012-10-22 20:16:1911namespace content {
12
[email protected]00c39612010-03-06 02:53:2813// A abstract interface representing the renderer end of the browser<->renderer
14// connection. The opposite end is the RenderProcessHost. This is a singleton
15// object for each renderer.
16//
17// RenderProcessImpl implements this interface for the regular browser.
18// MockRenderProcess implements this interface for certain tests, especially
19// ones derived from RenderViewTest.
initial.commit09911bf2008-07-26 23:55:2920class RenderProcess : public ChildProcess {
21 public:
[email protected]00c39612010-03-06 02:53:2822 RenderProcess() {}
dcheng6d18e402014-10-21 12:32:5223 ~RenderProcess() override {}
initial.commit09911bf2008-07-26 23:55:2924
[email protected]744c2a22012-03-15 18:42:0425 // Keep track of the cumulative set of enabled bindings for this process,
26 // across any view.
27 virtual void AddBindings(int bindings) = 0;
28
29 // The cumulative set of enabled bindings for this process.
30 virtual int GetEnabledBindings() const = 0;
31
[email protected]00c39612010-03-06 02:53:2832 // Returns a pointer to the RenderProcess singleton instance. Assuming that
33 // we're actually a renderer or a renderer test, this static cast will
34 // be correct.
[email protected]8930d472009-02-21 08:05:2835 static RenderProcess* current() {
36 return static_cast<RenderProcess*>(ChildProcess::current());
[email protected]ea51de32009-02-20 07:15:1737 }
38
[email protected]8930d472009-02-21 08:05:2839 private:
[email protected]1bc83062009-02-06 00:16:3740 DISALLOW_COPY_AND_ASSIGN(RenderProcess);
initial.commit09911bf2008-07-26 23:55:2941};
42
[email protected]eb398192012-10-22 20:16:1943} // namespace content
44
[email protected]8704f89b2011-04-15 00:30:0545#endif // CONTENT_RENDERER_RENDER_PROCESS_H_