| OLD | NEW |
| 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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 157 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 168 } | 168 } |
| 169 | 169 |
| 170 #if !defined(DISABLE_NACL) | 170 #if !defined(DISABLE_NACL) |
| 171 if (command_line.HasSwitch(switches::kInternalNaCl)) { | 171 if (command_line.HasSwitch(switches::kInternalNaCl)) { |
| 172 std::map<std::string, uintptr_t> funcs; | 172 std::map<std::string, uintptr_t> funcs; |
| 173 funcs["launch_nacl_process_multi_fd"] = | 173 funcs["launch_nacl_process_multi_fd"] = |
| 174 reinterpret_cast<uintptr_t>(LaunchNaClProcessMultiFD); | 174 reinterpret_cast<uintptr_t>(LaunchNaClProcessMultiFD); |
| 175 RegisterInternalNaClPlugin(funcs); | 175 RegisterInternalNaClPlugin(funcs); |
| 176 #if defined(OS_LINUX) | 176 #if defined(OS_LINUX) |
| 177 nacl::SetCreateMemoryObjectFunc( | 177 nacl::SetCreateMemoryObjectFunc( |
| 178 renderer_sandbox_support::MakeSharedMemorySegmentViaIPCExecutable); | 178 renderer_sandbox_support::MakeSharedMemorySegmentViaIPC); |
| 179 #endif | 179 #endif |
| 180 } | 180 } |
| 181 #endif | 181 #endif |
| 182 | 182 |
| 183 #if defined(OS_MACOSX) | 183 #if defined(OS_MACOSX) |
| 184 FilePath bundle_path = mac_util::MainAppBundlePath(); | 184 FilePath bundle_path = mac_util::MainAppBundlePath(); |
| 185 | 185 |
| 186 initialized_media_library_ = | 186 initialized_media_library_ = |
| 187 media::InitializeMediaLibrary(bundle_path.Append("Libraries")); | 187 media::InitializeMediaLibrary(bundle_path.Append("Libraries")); |
| 188 #else | 188 #else |
| (...skipping 182 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 371 } | 371 } |
| 372 | 372 |
| 373 void RenderProcessImpl::ClearTransportDIBCache() { | 373 void RenderProcessImpl::ClearTransportDIBCache() { |
| 374 for (size_t i = 0; i < arraysize(shared_mem_cache_); ++i) { | 374 for (size_t i = 0; i < arraysize(shared_mem_cache_); ++i) { |
| 375 if (shared_mem_cache_[i]) { | 375 if (shared_mem_cache_[i]) { |
| 376 FreeTransportDIB(shared_mem_cache_[i]); | 376 FreeTransportDIB(shared_mem_cache_[i]); |
| 377 shared_mem_cache_[i] = NULL; | 377 shared_mem_cache_[i] = NULL; |
| 378 } | 378 } |
| 379 } | 379 } |
| 380 } | 380 } |
| OLD | NEW |