| OLD | NEW |
| 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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_IMPL_H_ | 5 #ifndef CONTENT_RENDERER_RENDER_PROCESS_IMPL_H_ |
| 6 #define CONTENT_RENDERER_RENDER_PROCESS_IMPL_H_ | 6 #define CONTENT_RENDERER_RENDER_PROCESS_IMPL_H_ |
| 7 #pragma once | 7 #pragma once |
| 8 | 8 |
| 9 #include "base/timer.h" | 9 #include "base/timer.h" |
| 10 #include "content/renderer/render_process.h" | 10 #include "content/renderer/render_process.h" |
| 11 #include "native_client/src/shared/imc/nacl_imc.h" | 11 #include "native_client/src/shared/imc/nacl_imc.h" |
| 12 | 12 |
| 13 namespace skia { | 13 namespace skia { |
| 14 class PlatformCanvas; | 14 class PlatformCanvas; |
| 15 } | 15 } |
| 16 | 16 |
| 17 // Implementation of the RenderProcess interface for the regular browser. | 17 // Implementation of the RenderProcess interface for the regular browser. |
| 18 // See also MockRenderProcess which implements the active "RenderProcess" when | 18 // See also MockRenderProcess which implements the active "RenderProcess" when |
| 19 // running under certain unit tests. | 19 // running under certain unit tests. |
| 20 class RenderProcessImpl : public RenderProcess { | 20 class RenderProcessImpl : public RenderProcess { |
| 21 public: | 21 public: |
| 22 RenderProcessImpl(); | 22 RenderProcessImpl(); |
| 23 virtual ~RenderProcessImpl(); | 23 virtual ~RenderProcessImpl(); |
| 24 | 24 |
| 25 // RenderProcess implementation. | 25 // RenderProcess implementation. |
| 26 virtual skia::PlatformCanvas* GetDrawingCanvas(TransportDIB** memory, | 26 virtual skia::PlatformCanvas* GetDrawingCanvas( |
| 27 const gfx::Rect& rect); | 27 TransportDIB** memory, |
| 28 virtual void ReleaseTransportDIB(TransportDIB* memory); | 28 const gfx::Rect& rect) OVERRIDE; |
| 29 virtual bool UseInProcessPlugins() const; | 29 virtual void ReleaseTransportDIB(TransportDIB* memory) OVERRIDE; |
| 30 virtual bool UseInProcessPlugins() const OVERRIDE; |
| 30 | 31 |
| 31 // Like UseInProcessPlugins(), but called before RenderProcess is created | 32 // Like UseInProcessPlugins(), but called before RenderProcess is created |
| 32 // and does not allow overriding by tests. This just checks the command line | 33 // and does not allow overriding by tests. This just checks the command line |
| 33 // each time. | 34 // each time. |
| 34 static bool InProcessPlugins(); | 35 static bool InProcessPlugins(); |
| 35 | 36 |
| 36 private: | 37 private: |
| 37 // Look in the shared memory cache for a suitable object to reuse. | 38 // Look in the shared memory cache for a suitable object to reuse. |
| 38 // result: (output) the memory found | 39 // result: (output) the memory found |
| 39 // size: the resulting memory will be >= this size, in bytes | 40 // size: the resulting memory will be >= this size, in bytes |
| (...skipping 26 matching lines...) Expand all Loading... |
| 66 | 67 |
| 67 // TransportDIB sequence number | 68 // TransportDIB sequence number |
| 68 uint32 transport_dib_next_sequence_number_; | 69 uint32 transport_dib_next_sequence_number_; |
| 69 | 70 |
| 70 bool in_process_plugins_; | 71 bool in_process_plugins_; |
| 71 | 72 |
| 72 DISALLOW_COPY_AND_ASSIGN(RenderProcessImpl); | 73 DISALLOW_COPY_AND_ASSIGN(RenderProcessImpl); |
| 73 }; | 74 }; |
| 74 | 75 |
| 75 #endif // CONTENT_RENDERER_RENDER_PROCESS_IMPL_H_ | 76 #endif // CONTENT_RENDERER_RENDER_PROCESS_IMPL_H_ |
| OLD | NEW |