| 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> |
| (...skipping 12 matching lines...) Expand all Loading... |
| 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/render_messages.h" | 27 #include "chrome/common/render_messages.h" |
| 28 #include "chrome/common/transport_dib.h" | 28 #include "chrome/common/transport_dib.h" |
| 29 #include "chrome/renderer/render_view.h" | 29 #include "chrome/renderer/render_view.h" |
| 30 #include "ipc/ipc_channel.h" | 30 #include "ipc/ipc_channel.h" |
| 31 #include "ipc/ipc_message_utils.h" | 31 #include "ipc/ipc_message_utils.h" |
| 32 #include "media/base/media.h" | 32 #include "media/base/media.h" |
| 33 #include "native_client/src/trusted/plugin/nacl_entry_points.h" | |
| 34 #include "webkit/glue/webkit_glue.h" | 33 #include "webkit/glue/webkit_glue.h" |
| 35 #include "webkit/glue/plugins/plugin_list.h" | |
| 36 | 34 |
| 37 //----------------------------------------------------------------------------- | 35 //----------------------------------------------------------------------------- |
| 38 | 36 |
| 39 RenderProcess::RenderProcess() | 37 RenderProcess::RenderProcess() |
| 40 : ALLOW_THIS_IN_INITIALIZER_LIST(shared_mem_cache_cleaner_( | 38 : ALLOW_THIS_IN_INITIALIZER_LIST(shared_mem_cache_cleaner_( |
| 41 base::TimeDelta::FromSeconds(5), | 39 base::TimeDelta::FromSeconds(5), |
| 42 this, &RenderProcess::ClearTransportDIBCache)), | 40 this, &RenderProcess::ClearTransportDIBCache)), |
| 43 sequence_number_(0) { | 41 sequence_number_(0) { |
| 44 in_process_plugins_ = InProcessPlugins(); | 42 in_process_plugins_ = InProcessPlugins(); |
| 45 for (size_t i = 0; i < arraysize(shared_mem_cache_); ++i) | 43 for (size_t i = 0; i < arraysize(shared_mem_cache_); ++i) |
| (...skipping 29 matching lines...) Expand all Loading... |
| 75 } | 73 } |
| 76 | 74 |
| 77 if (command_line.HasSwitch(switches::kEnableWatchdog)) { | 75 if (command_line.HasSwitch(switches::kEnableWatchdog)) { |
| 78 // TODO(JAR): Need to implement renderer IO msgloop watchdog. | 76 // TODO(JAR): Need to implement renderer IO msgloop watchdog. |
| 79 } | 77 } |
| 80 | 78 |
| 81 if (command_line.HasSwitch(switches::kDumpHistogramsOnExit)) { | 79 if (command_line.HasSwitch(switches::kDumpHistogramsOnExit)) { |
| 82 StatisticsRecorder::set_dump_on_exit(true); | 80 StatisticsRecorder::set_dump_on_exit(true); |
| 83 } | 81 } |
| 84 | 82 |
| 85 if (command_line.HasSwitch(switches::kInternalNaCl)) { | |
| 86 NPAPI::PluginEntryPoints entry_points = { | |
| 87 #if !defined(OS_LINUX) | |
| 88 NaCl_NP_GetEntryPoints, | |
| 89 #endif | |
| 90 NaCl_NP_Initialize, | |
| 91 NaCl_NP_Shutdown}; | |
| 92 NPAPI::PluginList::UseInternalNaCl(&entry_points); | |
| 93 } | |
| 94 | |
| 95 FilePath module_path; | 83 FilePath module_path; |
| 96 initialized_media_library_ = | 84 initialized_media_library_ = |
| 97 PathService::Get(base::DIR_MODULE, &module_path) && | 85 PathService::Get(base::DIR_MODULE, &module_path) && |
| 98 media::InitializeMediaLibrary(module_path); | 86 media::InitializeMediaLibrary(module_path); |
| 99 } | 87 } |
| 100 | 88 |
| 101 RenderProcess::~RenderProcess() { | 89 RenderProcess::~RenderProcess() { |
| 102 // TODO(port) | 90 // TODO(port) |
| 103 // Try and limit what we pull in for our non-Win unit test bundle | 91 // Try and limit what we pull in for our non-Win unit test bundle |
| 104 #ifndef NDEBUG | 92 #ifndef NDEBUG |
| (...skipping 146 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 251 } | 239 } |
| 252 | 240 |
| 253 void RenderProcess::ClearTransportDIBCache() { | 241 void RenderProcess::ClearTransportDIBCache() { |
| 254 for (size_t i = 0; i < arraysize(shared_mem_cache_); ++i) { | 242 for (size_t i = 0; i < arraysize(shared_mem_cache_); ++i) { |
| 255 if (shared_mem_cache_[i]) { | 243 if (shared_mem_cache_[i]) { |
| 256 FreeTransportDIB(shared_mem_cache_[i]); | 244 FreeTransportDIB(shared_mem_cache_[i]); |
| 257 shared_mem_cache_[i] = NULL; | 245 shared_mem_cache_[i] = NULL; |
| 258 } | 246 } |
| 259 } | 247 } |
| 260 } | 248 } |
| OLD | NEW |