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

Side by Side Diff: chrome/renderer/render_process.h

Issue 6864001: Move RenderProcess to content. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 9 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 | Annotate | Revision Log
« no previous file with comments | « chrome/renderer/mock_render_process.h ('k') | chrome/renderer/render_process_impl.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 // Copyright (c) 2010 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.
4
5 #ifndef CHROME_RENDERER_RENDER_PROCESS_H_
6 #define CHROME_RENDERER_RENDER_PROCESS_H_
7 #pragma once
8
9 #include "content/common/child_process.h"
10 #include "skia/ext/platform_canvas.h"
11
12 class TransportDIB;
13
14 namespace gfx {
15 class Rect;
16 }
17
18 namespace skia {
19 class PlatformCanvas;
20 }
21
22 // A abstract interface representing the renderer end of the browser<->renderer
23 // connection. The opposite end is the RenderProcessHost. This is a singleton
24 // object for each renderer.
25 //
26 // RenderProcessImpl implements this interface for the regular browser.
27 // MockRenderProcess implements this interface for certain tests, especially
28 // ones derived from RenderViewTest.
29 class RenderProcess : public ChildProcess {
30 public:
31 RenderProcess() {}
32 virtual ~RenderProcess() {}
33
34 // Get a canvas suitable for drawing and transporting to the browser
35 // memory: (output) the transport DIB memory
36 // rect: the rectangle which will be painted, use for sizing the canvas
37 // returns: NULL on error
38 //
39 // When no longer needed, you should pass the TransportDIB to
40 // ReleaseTransportDIB so that it can be recycled.
41 virtual skia::PlatformCanvas* GetDrawingCanvas(TransportDIB** memory,
42 const gfx::Rect& rect) = 0;
43
44 // Frees shared memory allocated by AllocSharedMemory. You should only use
45 // this function to free the SharedMemory object.
46 virtual void ReleaseTransportDIB(TransportDIB* memory) = 0;
47
48 // Returns true if plugisn should be loaded in-process.
49 virtual bool UseInProcessPlugins() const = 0;
50
51 virtual bool HasInitializedMediaLibrary() const = 0;
52
53 // Returns a pointer to the RenderProcess singleton instance. Assuming that
54 // we're actually a renderer or a renderer test, this static cast will
55 // be correct.
56 static RenderProcess* current() {
57 return static_cast<RenderProcess*>(ChildProcess::current());
58 }
59
60 private:
61 DISALLOW_COPY_AND_ASSIGN(RenderProcess);
62 };
63
64 #endif // CHROME_RENDERER_RENDER_PROCESS_H_
OLDNEW
« no previous file with comments | « chrome/renderer/mock_render_process.h ('k') | chrome/renderer/render_process_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698