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

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

Issue 42158: Get rid of the gears in renderer process code. This allows me to do some cle... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 11 years, 9 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
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"
(...skipping 27 matching lines...) Expand all
38 skia::PlatformCanvas* GetDrawingCanvas( 38 skia::PlatformCanvas* GetDrawingCanvas(
39 TransportDIB** memory, const gfx::Rect& rect); 39 TransportDIB** memory, const gfx::Rect& rect);
40 40
41 // Frees shared memory allocated by AllocSharedMemory. You should only use 41 // Frees shared memory allocated by AllocSharedMemory. You should only use
42 // this function to free the SharedMemory object. 42 // this function to free the SharedMemory object.
43 void ReleaseTransportDIB(TransportDIB* memory); 43 void ReleaseTransportDIB(TransportDIB* memory);
44 44
45 // Returns true if plugins should be loaded in-process. 45 // Returns true if plugins should be loaded in-process.
46 bool in_process_plugins() const { return in_process_plugins_; } 46 bool in_process_plugins() const { return in_process_plugins_; }
47 47
48 // Returns true if Gears should be loaded in-process.
49 bool in_process_gears() const { return in_process_gears_; }
50
51 // Returns a pointer to the RenderProcess singleton instance. 48 // Returns a pointer to the RenderProcess singleton instance.
52 static RenderProcess* current() { 49 static RenderProcess* current() {
53 return static_cast<RenderProcess*>(ChildProcess::current()); 50 return static_cast<RenderProcess*>(ChildProcess::current());
54 } 51 }
55 52
56 protected: 53 protected:
57 friend class RenderThread; 54 friend class RenderThread;
58 // Just like in_process_plugins(), but called before RenderProcess is created. 55 // Just like in_process_plugins(), but called before RenderProcess is created.
59 static bool InProcessPlugins(); 56 static bool InProcessPlugins();
60 57
(...skipping 27 matching lines...) Expand all
88 // then it points to a SharedMemory object that is available for reuse. 85 // then it points to a SharedMemory object that is available for reuse.
89 TransportDIB* shared_mem_cache_[2]; 86 TransportDIB* shared_mem_cache_[2];
90 87
91 // This DelayTimer cleans up our cache 5 seconds after the last use. 88 // This DelayTimer cleans up our cache 5 seconds after the last use.
92 base::DelayTimer<RenderProcess> shared_mem_cache_cleaner_; 89 base::DelayTimer<RenderProcess> shared_mem_cache_cleaner_;
93 90
94 // TransportDIB sequence number 91 // TransportDIB sequence number
95 uint32 sequence_number_; 92 uint32 sequence_number_;
96 93
97 bool in_process_plugins_; 94 bool in_process_plugins_;
98 bool in_process_gears_;
99 95
100 DISALLOW_COPY_AND_ASSIGN(RenderProcess); 96 DISALLOW_COPY_AND_ASSIGN(RenderProcess);
101 }; 97 };
102 98
103 #endif // CHROME_RENDERER_RENDER_PROCESS_H__ 99 #endif // CHROME_RENDERER_RENDER_PROCESS_H__
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698