Chromium Code Reviews| 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 112 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 123 } | 123 } |
| 124 | 124 |
| 125 if (command_line.HasSwitch(switches::kEnableWatchdog)) { | 125 if (command_line.HasSwitch(switches::kEnableWatchdog)) { |
| 126 // TODO(JAR): Need to implement renderer IO msgloop watchdog. | 126 // TODO(JAR): Need to implement renderer IO msgloop watchdog. |
| 127 } | 127 } |
| 128 | 128 |
| 129 if (command_line.HasSwitch(switches::kDumpHistogramsOnExit)) { | 129 if (command_line.HasSwitch(switches::kDumpHistogramsOnExit)) { |
| 130 base::StatisticsRecorder::set_dump_on_exit(true); | 130 base::StatisticsRecorder::set_dump_on_exit(true); |
| 131 } | 131 } |
| 132 | 132 |
| 133 #if defined(OS_MACOSX) | 133 FilePath media_path; |
| 134 FilePath bundle_path = base::mac::MainAppBundlePath(); | 134 CHECK(PathService::Get(chrome::DIR_MEDIA_LIBS, &media_path)); |
| 135 initialized_media_library_ = media::InitializeMediaLibrary(media_path); | |
| 135 | 136 |
| 136 initialized_media_library_ = | 137 #if !defined(OS_MACOSX) |
|
scherkus (not reviewing)
2011/02/17 17:57:10
I'm curious... I wonder if we can remove this rest
| |
| 137 media::InitializeMediaLibrary(bundle_path.Append("Libraries")); | |
| 138 #else | |
| 139 FilePath module_path; | |
| 140 initialized_media_library_ = | |
| 141 PathService::Get(base::DIR_MODULE, &module_path) && | |
| 142 media::InitializeMediaLibrary(module_path); | |
| 143 | |
| 144 // TODO(hclam): Add more checks here. Currently this is not used. | 138 // TODO(hclam): Add more checks here. Currently this is not used. |
| 145 if (CommandLine::ForCurrentProcess()->HasSwitch( | 139 if (CommandLine::ForCurrentProcess()->HasSwitch( |
| 146 switches::kEnableOpenMax)) { | 140 switches::kEnableOpenMax)) { |
| 147 media::InitializeOpenMaxLibrary(module_path); | 141 media::InitializeOpenMaxLibrary(media_path); |
| 148 } | 142 } |
| 149 #endif | 143 #endif |
| 150 | 144 |
| 151 #if defined(OS_WIN) | 145 #if defined(OS_WIN) |
| 152 // Need to patch a few functions for font loading to work correctly. | 146 // Need to patch a few functions for font loading to work correctly. |
| 153 FilePath pdf; | 147 FilePath pdf; |
| 154 if (PathService::Get(chrome::FILE_PDF_PLUGIN, &pdf) && | 148 if (PathService::Get(chrome::FILE_PDF_PLUGIN, &pdf) && |
| 155 file_util::PathExists(pdf)) { | 149 file_util::PathExists(pdf)) { |
| 156 g_iat_patch_createdca.Patch( | 150 g_iat_patch_createdca.Patch( |
| 157 pdf.value().c_str(), "gdi32.dll", "CreateDCA", CreateDCAPatch); | 151 pdf.value().c_str(), "gdi32.dll", "CreateDCA", CreateDCAPatch); |
| (...skipping 163 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 321 } | 315 } |
| 322 | 316 |
| 323 void RenderProcessImpl::ClearTransportDIBCache() { | 317 void RenderProcessImpl::ClearTransportDIBCache() { |
| 324 for (size_t i = 0; i < arraysize(shared_mem_cache_); ++i) { | 318 for (size_t i = 0; i < arraysize(shared_mem_cache_); ++i) { |
| 325 if (shared_mem_cache_[i]) { | 319 if (shared_mem_cache_[i]) { |
| 326 FreeTransportDIB(shared_mem_cache_[i]); | 320 FreeTransportDIB(shared_mem_cache_[i]); |
| 327 shared_mem_cache_[i] = NULL; | 321 shared_mem_cache_[i] = NULL; |
| 328 } | 322 } |
| 329 } | 323 } |
| 330 } | 324 } |
| OLD | NEW |