| OLD | NEW |
| 1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2006-2008 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 CHROME_RENDERER_RENDER_PROCESS_H__ | 5 #ifndef CHROME_RENDERER_RENDER_PROCESS_H__ |
| 6 #define CHROME_RENDERER_RENDER_PROCESS_H__ | 6 #define CHROME_RENDERER_RENDER_PROCESS_H__ |
| 7 | 7 |
| 8 #include "base/timer.h" | 8 #include "base/timer.h" |
| 9 #include "chrome/common/child_process.h" | 9 #include "chrome/common/child_process.h" |
| 10 #include "chrome/renderer/render_thread.h" | 10 #include "chrome/renderer/render_thread.h" |
| 11 #include "native_client/src/shared/imc/nacl_imc.h" | |
| 12 #include "skia/ext/platform_canvas.h" | 11 #include "skia/ext/platform_canvas.h" |
| 13 | 12 |
| 14 namespace gfx { | 13 namespace gfx { |
| 15 class Rect; | 14 class Rect; |
| 16 } | 15 } |
| 17 | 16 |
| 18 class TransportDIB; | 17 class TransportDIB; |
| 19 | 18 |
| 20 // Represents the renderer end of the browser<->renderer connection. The | 19 // Represents the renderer end of the browser<->renderer connection. The |
| 21 // opposite end is the RenderProcessHost. This is a singleton object for | 20 // opposite end is the RenderProcessHost. This is a singleton object for |
| (...skipping 23 matching lines...) Expand all Loading... |
| 45 bool initialized_media_library() const { return initialized_media_library_; } | 44 bool initialized_media_library() const { return initialized_media_library_; } |
| 46 | 45 |
| 47 // Returns a pointer to the RenderProcess singleton instance. | 46 // Returns a pointer to the RenderProcess singleton instance. |
| 48 static RenderProcess* current() { | 47 static RenderProcess* current() { |
| 49 return static_cast<RenderProcess*>(ChildProcess::current()); | 48 return static_cast<RenderProcess*>(ChildProcess::current()); |
| 50 } | 49 } |
| 51 | 50 |
| 52 // Just like in_process_plugins(), but called before RenderProcess is created. | 51 // Just like in_process_plugins(), but called before RenderProcess is created. |
| 53 static bool InProcessPlugins(); | 52 static bool InProcessPlugins(); |
| 54 | 53 |
| 55 // Sends a message to the browser process asking to launch a new NaCl process. | |
| 56 // Called from NaCl plugin code. | |
| 57 static bool LaunchNaClProcess(int imc_fd, nacl::Handle *handle); | |
| 58 | |
| 59 private: | 54 private: |
| 60 // Look in the shared memory cache for a suitable object to reuse. | 55 // Look in the shared memory cache for a suitable object to reuse. |
| 61 // result: (output) the memory found | 56 // result: (output) the memory found |
| 62 // size: the resulting memory will be >= this size, in bytes | 57 // size: the resulting memory will be >= this size, in bytes |
| 63 // returns: false if a suitable DIB memory could not be found | 58 // returns: false if a suitable DIB memory could not be found |
| 64 bool GetTransportDIBFromCache(TransportDIB** result, size_t size); | 59 bool GetTransportDIBFromCache(TransportDIB** result, size_t size); |
| 65 | 60 |
| 66 // Maybe put the given shared memory into the shared memory cache. Returns | 61 // Maybe put the given shared memory into the shared memory cache. Returns |
| 67 // true if the SharedMemory object was stored in the cache; otherwise, false | 62 // true if the SharedMemory object was stored in the cache; otherwise, false |
| 68 // is returned. | 63 // is returned. |
| (...skipping 21 matching lines...) Expand all Loading... |
| 90 // TransportDIB sequence number | 85 // TransportDIB sequence number |
| 91 uint32 sequence_number_; | 86 uint32 sequence_number_; |
| 92 | 87 |
| 93 bool in_process_plugins_; | 88 bool in_process_plugins_; |
| 94 bool initialized_media_library_; | 89 bool initialized_media_library_; |
| 95 | 90 |
| 96 DISALLOW_COPY_AND_ASSIGN(RenderProcess); | 91 DISALLOW_COPY_AND_ASSIGN(RenderProcess); |
| 97 }; | 92 }; |
| 98 | 93 |
| 99 #endif // CHROME_RENDERER_RENDER_PROCESS_H__ | 94 #endif // CHROME_RENDERER_RENDER_PROCESS_H__ |
| OLD | NEW |