OLD | NEW |
1 // Copyright (c) 2011 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 #include "build/build_config.h" | 5 #include "build/build_config.h" |
6 | 6 |
7 #if defined(OS_WIN) | 7 #if defined(OS_WIN) |
8 #include <windows.h> | 8 #include <windows.h> |
9 #include <objidl.h> | 9 #include <objidl.h> |
10 #include <mlang.h> | 10 #include <mlang.h> |
(...skipping 19 matching lines...) Expand all Loading... |
30 #include "skia/ext/platform_canvas.h" | 30 #include "skia/ext/platform_canvas.h" |
31 #include "ui/gfx/surface/transport_dib.h" | 31 #include "ui/gfx/surface/transport_dib.h" |
32 #include "webkit/plugins/npapi/plugin_instance.h" | 32 #include "webkit/plugins/npapi/plugin_instance.h" |
33 #include "webkit/plugins/npapi/plugin_lib.h" | 33 #include "webkit/plugins/npapi/plugin_lib.h" |
34 #include "webkit/glue/webkit_glue.h" | 34 #include "webkit/glue/webkit_glue.h" |
35 | 35 |
36 #if defined(OS_MACOSX) | 36 #if defined(OS_MACOSX) |
37 #include "base/mac/mac_util.h" | 37 #include "base/mac/mac_util.h" |
38 #endif | 38 #endif |
39 | 39 |
40 #if defined(OS_LINUX) | |
41 #include "content/renderer/renderer_sandbox_support_linux.h" | |
42 #endif | |
43 | |
44 RenderProcessImpl::RenderProcessImpl() | 40 RenderProcessImpl::RenderProcessImpl() |
45 : ALLOW_THIS_IN_INITIALIZER_LIST(shared_mem_cache_cleaner_( | 41 : ALLOW_THIS_IN_INITIALIZER_LIST(shared_mem_cache_cleaner_( |
46 base::TimeDelta::FromSeconds(5), | 42 base::TimeDelta::FromSeconds(5), |
47 this, &RenderProcessImpl::ClearTransportDIBCache)), | 43 this, &RenderProcessImpl::ClearTransportDIBCache)), |
48 transport_dib_next_sequence_number_(0) { | 44 transport_dib_next_sequence_number_(0) { |
49 in_process_plugins_ = InProcessPlugins(); | 45 in_process_plugins_ = InProcessPlugins(); |
50 for (size_t i = 0; i < arraysize(shared_mem_cache_); ++i) | 46 for (size_t i = 0; i < arraysize(shared_mem_cache_); ++i) |
51 shared_mem_cache_[i] = NULL; | 47 shared_mem_cache_[i] = NULL; |
52 | 48 |
53 #if defined(OS_WIN) | 49 #if defined(OS_WIN) |
(...skipping 202 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
256 } | 252 } |
257 | 253 |
258 void RenderProcessImpl::ClearTransportDIBCache() { | 254 void RenderProcessImpl::ClearTransportDIBCache() { |
259 for (size_t i = 0; i < arraysize(shared_mem_cache_); ++i) { | 255 for (size_t i = 0; i < arraysize(shared_mem_cache_); ++i) { |
260 if (shared_mem_cache_[i]) { | 256 if (shared_mem_cache_[i]) { |
261 FreeTransportDIB(shared_mem_cache_[i]); | 257 FreeTransportDIB(shared_mem_cache_[i]); |
262 shared_mem_cache_[i] = NULL; | 258 shared_mem_cache_[i] = NULL; |
263 } | 259 } |
264 } | 260 } |
265 } | 261 } |
OLD | NEW |