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

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

Issue 153002: NaCl-Chrome integration - step 1 (Closed) Base URL: http://src.chromium.org/svn/trunk/src/
Patch Set: '' Created 11 years, 2 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/nacl/sel_main.cc ('k') | chrome/renderer/render_process.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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"
11 #include "skia/ext/platform_canvas.h" 12 #include "skia/ext/platform_canvas.h"
12 13
13 namespace gfx { 14 namespace gfx {
14 class Rect; 15 class Rect;
15 } 16 }
16 17
17 class TransportDIB; 18 class TransportDIB;
18 19
19 // Represents the renderer end of the browser<->renderer connection. The 20 // Represents the renderer end of the browser<->renderer connection. The
20 // opposite end is the RenderProcessHost. This is a singleton object for 21 // opposite end is the RenderProcessHost. This is a singleton object for
(...skipping 23 matching lines...) Expand all
44 bool initialized_media_library() const { return initialized_media_library_; } 45 bool initialized_media_library() const { return initialized_media_library_; }
45 46
46 // Returns a pointer to the RenderProcess singleton instance. 47 // Returns a pointer to the RenderProcess singleton instance.
47 static RenderProcess* current() { 48 static RenderProcess* current() {
48 return static_cast<RenderProcess*>(ChildProcess::current()); 49 return static_cast<RenderProcess*>(ChildProcess::current());
49 } 50 }
50 51
51 // Just like in_process_plugins(), but called before RenderProcess is created. 52 // Just like in_process_plugins(), but called before RenderProcess is created.
52 static bool InProcessPlugins(); 53 static bool InProcessPlugins();
53 54
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
54 private: 59 private:
55 // Look in the shared memory cache for a suitable object to reuse. 60 // Look in the shared memory cache for a suitable object to reuse.
56 // result: (output) the memory found 61 // result: (output) the memory found
57 // size: the resulting memory will be >= this size, in bytes 62 // size: the resulting memory will be >= this size, in bytes
58 // returns: false if a suitable DIB memory could not be found 63 // returns: false if a suitable DIB memory could not be found
59 bool GetTransportDIBFromCache(TransportDIB** result, size_t size); 64 bool GetTransportDIBFromCache(TransportDIB** result, size_t size);
60 65
61 // Maybe put the given shared memory into the shared memory cache. Returns 66 // Maybe put the given shared memory into the shared memory cache. Returns
62 // true if the SharedMemory object was stored in the cache; otherwise, false 67 // true if the SharedMemory object was stored in the cache; otherwise, false
63 // is returned. 68 // is returned.
(...skipping 21 matching lines...) Expand all
85 // TransportDIB sequence number 90 // TransportDIB sequence number
86 uint32 sequence_number_; 91 uint32 sequence_number_;
87 92
88 bool in_process_plugins_; 93 bool in_process_plugins_;
89 bool initialized_media_library_; 94 bool initialized_media_library_;
90 95
91 DISALLOW_COPY_AND_ASSIGN(RenderProcess); 96 DISALLOW_COPY_AND_ASSIGN(RenderProcess);
92 }; 97 };
93 98
94 #endif // CHROME_RENDERER_RENDER_PROCESS_H__ 99 #endif // CHROME_RENDERER_RENDER_PROCESS_H__
OLDNEW
« no previous file with comments | « chrome/nacl/sel_main.cc ('k') | chrome/renderer/render_process.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698