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

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

Issue 11138024: Simplify platform_canvas.h by recognizing that PlatformCanvas does not actually extend (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 8 years, 1 month 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
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 "content/common/child_process.h" 8 #include "content/common/child_process.h"
9 #include "skia/ext/platform_canvas.h" 9 #include "skia/ext/platform_canvas.h"
10 10
11 class TransportDIB; 11 class TransportDIB;
12 12
13 namespace gfx { 13 namespace gfx {
14 class Rect; 14 class Rect;
15 } 15 }
16 16
17 namespace skia {
18 class PlatformCanvas;
19 }
20
21 namespace content { 17 namespace content {
22 18
23 // A abstract interface representing the renderer end of the browser<->renderer 19 // A abstract interface representing the renderer end of the browser<->renderer
24 // connection. The opposite end is the RenderProcessHost. This is a singleton 20 // connection. The opposite end is the RenderProcessHost. This is a singleton
25 // object for each renderer. 21 // object for each renderer.
26 // 22 //
27 // RenderProcessImpl implements this interface for the regular browser. 23 // RenderProcessImpl implements this interface for the regular browser.
28 // MockRenderProcess implements this interface for certain tests, especially 24 // MockRenderProcess implements this interface for certain tests, especially
29 // ones derived from RenderViewTest. 25 // ones derived from RenderViewTest.
30 class RenderProcess : public ChildProcess { 26 class RenderProcess : public ChildProcess {
31 public: 27 public:
32 RenderProcess() {} 28 RenderProcess() {}
33 virtual ~RenderProcess() {} 29 virtual ~RenderProcess() {}
34 30
35 // Get a canvas suitable for drawing and transporting to the browser 31 // Get a canvas suitable for drawing and transporting to the browser
36 // memory: (output) the transport DIB memory 32 // memory: (output) the transport DIB memory
37 // rect: the rectangle which will be painted, use for sizing the canvas 33 // rect: the rectangle which will be painted, use for sizing the canvas
38 // returns: NULL on error 34 // returns: NULL on error
39 // 35 //
40 // When no longer needed, you should pass the TransportDIB to 36 // When no longer needed, you should pass the TransportDIB to
41 // ReleaseTransportDIB so that it can be recycled. 37 // ReleaseTransportDIB so that it can be recycled.
42 virtual skia::PlatformCanvas* GetDrawingCanvas(TransportDIB** memory, 38 virtual SkCanvas* GetDrawingCanvas(TransportDIB** memory,
43 const gfx::Rect& rect) = 0; 39 const gfx::Rect& rect) = 0;
44 40
45 // Frees shared memory allocated by AllocSharedMemory. You should only use 41 // Frees shared memory allocated by AllocSharedMemory. You should only use
46 // this function to free the SharedMemory object. 42 // this function to free the SharedMemory object.
47 virtual void ReleaseTransportDIB(TransportDIB* memory) = 0; 43 virtual void ReleaseTransportDIB(TransportDIB* memory) = 0;
48 44
49 // Returns true if plugisn should be loaded in-process. 45 // Returns true if plugisn should be loaded in-process.
50 virtual bool UseInProcessPlugins() const = 0; 46 virtual bool UseInProcessPlugins() const = 0;
51 47
52 // Keep track of the cumulative set of enabled bindings for this process, 48 // Keep track of the cumulative set of enabled bindings for this process,
53 // across any view. 49 // across any view.
(...skipping 14 matching lines...) Expand all
68 return static_cast<RenderProcess*>(ChildProcess::current()); 64 return static_cast<RenderProcess*>(ChildProcess::current());
69 } 65 }
70 66
71 private: 67 private:
72 DISALLOW_COPY_AND_ASSIGN(RenderProcess); 68 DISALLOW_COPY_AND_ASSIGN(RenderProcess);
73 }; 69 };
74 70
75 } // namespace content 71 } // namespace content
76 72
77 #endif // CONTENT_RENDERER_RENDER_PROCESS_H_ 73 #endif // CONTENT_RENDERER_RENDER_PROCESS_H_
OLDNEW
« no previous file with comments | « content/renderer/pepper/pepper_platform_image_2d_impl.cc ('k') | content/renderer/render_process_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698