OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 "content/renderer/render_process_impl.h" | 5 #include "content/renderer/render_process_impl.h" |
6 | 6 |
7 #include "build/build_config.h" | 7 #include "build/build_config.h" |
8 | 8 |
9 #if defined(OS_WIN) | 9 #if defined(OS_WIN) |
10 #include <windows.h> | 10 #include <windows.h> |
(...skipping 16 matching lines...) Expand all Loading... |
27 #include "skia/ext/platform_canvas.h" | 27 #include "skia/ext/platform_canvas.h" |
28 #include "ui/surface/transport_dib.h" | 28 #include "ui/surface/transport_dib.h" |
29 #include "webkit/glue/webkit_glue.h" | 29 #include "webkit/glue/webkit_glue.h" |
30 #include "webkit/plugins/npapi/plugin_instance.h" | 30 #include "webkit/plugins/npapi/plugin_instance.h" |
31 #include "webkit/plugins/npapi/plugin_lib.h" | 31 #include "webkit/plugins/npapi/plugin_lib.h" |
32 | 32 |
33 #if defined(OS_MACOSX) | 33 #if defined(OS_MACOSX) |
34 #include "base/mac/mac_util.h" | 34 #include "base/mac/mac_util.h" |
35 #endif | 35 #endif |
36 | 36 |
| 37 namespace content { |
| 38 |
37 RenderProcessImpl::RenderProcessImpl() | 39 RenderProcessImpl::RenderProcessImpl() |
38 : ALLOW_THIS_IN_INITIALIZER_LIST(shared_mem_cache_cleaner_( | 40 : ALLOW_THIS_IN_INITIALIZER_LIST(shared_mem_cache_cleaner_( |
39 FROM_HERE, base::TimeDelta::FromSeconds(5), | 41 FROM_HERE, base::TimeDelta::FromSeconds(5), |
40 this, &RenderProcessImpl::ClearTransportDIBCache)), | 42 this, &RenderProcessImpl::ClearTransportDIBCache)), |
41 transport_dib_next_sequence_number_(0), | 43 transport_dib_next_sequence_number_(0), |
42 enabled_bindings_(0) { | 44 enabled_bindings_(0) { |
43 in_process_plugins_ = InProcessPlugins(); | 45 in_process_plugins_ = InProcessPlugins(); |
44 for (size_t i = 0; i < arraysize(shared_mem_cache_); ++i) | 46 for (size_t i = 0; i < arraysize(shared_mem_cache_); ++i) |
45 shared_mem_cache_[i] = NULL; | 47 shared_mem_cache_[i] = NULL; |
46 | 48 |
(...skipping 192 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
239 } | 241 } |
240 | 242 |
241 void RenderProcessImpl::ClearTransportDIBCache() { | 243 void RenderProcessImpl::ClearTransportDIBCache() { |
242 for (size_t i = 0; i < arraysize(shared_mem_cache_); ++i) { | 244 for (size_t i = 0; i < arraysize(shared_mem_cache_); ++i) { |
243 if (shared_mem_cache_[i]) { | 245 if (shared_mem_cache_[i]) { |
244 FreeTransportDIB(shared_mem_cache_[i]); | 246 FreeTransportDIB(shared_mem_cache_[i]); |
245 shared_mem_cache_[i] = NULL; | 247 shared_mem_cache_[i] = NULL; |
246 } | 248 } |
247 } | 249 } |
248 } | 250 } |
| 251 |
| 252 } // namespace content |
OLD | NEW |