Don't pass a null ServiceWorker registration with OK status code.
[chromium-blink-merge.git] / content / renderer / render_process.h
blob5a1754d72500defcb7b265408da8742fde84c76b
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
3 // found in the LICENSE file.
5 #ifndef CONTENT_RENDERER_RENDER_PROCESS_H_
6 #define CONTENT_RENDERER_RENDER_PROCESS_H_
8 #include "content/child/child_process.h"
9 #include "skia/ext/platform_canvas.h"
11 class TransportDIB;
13 namespace gfx {
14 class Rect;
17 namespace content {
19 // A abstract interface representing the renderer end of the browser<->renderer
20 // connection. The opposite end is the RenderProcessHost. This is a singleton
21 // object for each renderer.
23 // RenderProcessImpl implements this interface for the regular browser.
24 // MockRenderProcess implements this interface for certain tests, especially
25 // ones derived from RenderViewTest.
26 class RenderProcess : public ChildProcess {
27 public:
28 RenderProcess() {}
29 virtual ~RenderProcess() {}
31 // Keep track of the cumulative set of enabled bindings for this process,
32 // across any view.
33 virtual void AddBindings(int bindings) = 0;
35 // The cumulative set of enabled bindings for this process.
36 virtual int GetEnabledBindings() const = 0;
38 // Returns a pointer to the RenderProcess singleton instance. Assuming that
39 // we're actually a renderer or a renderer test, this static cast will
40 // be correct.
41 static RenderProcess* current() {
42 return static_cast<RenderProcess*>(ChildProcess::current());
45 private:
46 DISALLOW_COPY_AND_ASSIGN(RenderProcess);
49 } // namespace content
51 #endif // CONTENT_RENDERER_RENDER_PROCESS_H_