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 #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> |
11 #endif | 11 #endif |
12 | 12 |
13 #include "chrome/renderer/render_process.h" | 13 #include "chrome/renderer/render_process.h" |
14 | 14 |
15 #include "base/basictypes.h" | 15 #include "base/basictypes.h" |
16 #include "base/command_line.h" | 16 #include "base/command_line.h" |
17 #include "base/compiler_specific.h" | 17 #include "base/compiler_specific.h" |
18 #include "base/file_util.h" | 18 #include "base/file_util.h" |
19 #include "base/message_loop.h" | 19 #include "base/message_loop.h" |
20 #include "base/histogram.h" | 20 #include "base/histogram.h" |
21 #include "base/path_service.h" | 21 #include "base/path_service.h" |
22 #include "base/sys_info.h" | 22 #include "base/sys_info.h" |
23 // TODO(jar): DNS calls should be renderer specific, not including browser. | 23 // TODO(jar): DNS calls should be renderer specific, not including browser. |
24 #include "chrome/browser/net/dns_global.h" | 24 #include "chrome/browser/net/dns_global.h" |
25 #include "chrome/common/chrome_switches.h" | 25 #include "chrome/common/chrome_switches.h" |
26 #include "chrome/common/chrome_paths.h" | 26 #include "chrome/common/chrome_paths.h" |
27 #include "chrome/common/ipc_channel.h" | |
28 #include "chrome/common/ipc_message_utils.h" | |
29 #include "chrome/common/render_messages.h" | 27 #include "chrome/common/render_messages.h" |
30 #include "chrome/common/transport_dib.h" | 28 #include "chrome/common/transport_dib.h" |
31 #include "chrome/renderer/render_view.h" | 29 #include "chrome/renderer/render_view.h" |
| 30 #include "ipc/ipc_channel.h" |
| 31 #include "ipc/ipc_message_utils.h" |
32 #include "media/base/media.h" | 32 #include "media/base/media.h" |
33 #include "webkit/glue/webkit_glue.h" | 33 #include "webkit/glue/webkit_glue.h" |
34 | 34 |
35 static size_t GetMaxSharedMemorySize() { | 35 static size_t GetMaxSharedMemorySize() { |
36 static int size = 0; | 36 static int size = 0; |
37 #if defined(OS_LINUX) | 37 #if defined(OS_LINUX) |
38 if (size == 0) { | 38 if (size == 0) { |
39 std::string contents; | 39 std::string contents; |
40 file_util::ReadFileToString(FilePath("/proc/sys/kernel/shmmax"), &contents); | 40 file_util::ReadFileToString(FilePath("/proc/sys/kernel/shmmax"), &contents); |
41 size = strtoul(contents.c_str(), NULL, 0); | 41 size = strtoul(contents.c_str(), NULL, 0); |
(...skipping 226 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
268 } | 268 } |
269 | 269 |
270 void RenderProcess::ClearTransportDIBCache() { | 270 void RenderProcess::ClearTransportDIBCache() { |
271 for (size_t i = 0; i < arraysize(shared_mem_cache_); ++i) { | 271 for (size_t i = 0; i < arraysize(shared_mem_cache_); ++i) { |
272 if (shared_mem_cache_[i]) { | 272 if (shared_mem_cache_[i]) { |
273 FreeTransportDIB(shared_mem_cache_[i]); | 273 FreeTransportDIB(shared_mem_cache_[i]); |
274 shared_mem_cache_[i] = NULL; | 274 shared_mem_cache_[i] = NULL; |
275 } | 275 } |
276 } | 276 } |
277 } | 277 } |
OLD | NEW |