OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 63 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
74 webkit_glue::SetJavaScriptFlags( | 74 webkit_glue::SetJavaScriptFlags( |
75 command_line.GetSwitchValueASCII(switches::kJavaScriptFlags)); | 75 command_line.GetSwitchValueASCII(switches::kJavaScriptFlags)); |
76 } | 76 } |
77 | 77 |
78 // Note that under Linux, the media library will normally already have | 78 // Note that under Linux, the media library will normally already have |
79 // been initialized by the Zygote before this instance became a Renderer. | 79 // been initialized by the Zygote before this instance became a Renderer. |
80 FilePath media_path = | 80 FilePath media_path = |
81 content::GetContentClient()->renderer()->GetMediaLibraryPath(); | 81 content::GetContentClient()->renderer()->GetMediaLibraryPath(); |
82 if (!media_path.empty()) | 82 if (!media_path.empty()) |
83 media::InitializeMediaLibrary(media_path); | 83 media::InitializeMediaLibrary(media_path); |
| 84 |
| 85 #if !defined(OS_MACOSX) |
| 86 // TODO(hclam): Add more checks here. Currently this is not used. |
| 87 if (media::IsMediaLibraryInitialized() && |
| 88 CommandLine::ForCurrentProcess()->HasSwitch( |
| 89 switches::kEnableOpenMax)) { |
| 90 media::InitializeOpenMaxLibrary(media_path); |
| 91 } |
| 92 #endif |
84 } | 93 } |
85 | 94 |
86 RenderProcessImpl::~RenderProcessImpl() { | 95 RenderProcessImpl::~RenderProcessImpl() { |
87 // TODO(port): Try and limit what we pull in for our non-Win unit test bundle. | 96 // TODO(port): Try and limit what we pull in for our non-Win unit test bundle. |
88 #ifndef NDEBUG | 97 #ifndef NDEBUG |
89 // log important leaked objects | 98 // log important leaked objects |
90 webkit_glue::CheckForLeaks(); | 99 webkit_glue::CheckForLeaks(); |
91 #endif | 100 #endif |
92 | 101 |
93 GetShutDownEvent()->Signal(); | 102 GetShutDownEvent()->Signal(); |
(...skipping 149 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
243 } | 252 } |
244 | 253 |
245 void RenderProcessImpl::ClearTransportDIBCache() { | 254 void RenderProcessImpl::ClearTransportDIBCache() { |
246 for (size_t i = 0; i < arraysize(shared_mem_cache_); ++i) { | 255 for (size_t i = 0; i < arraysize(shared_mem_cache_); ++i) { |
247 if (shared_mem_cache_[i]) { | 256 if (shared_mem_cache_[i]) { |
248 FreeTransportDIB(shared_mem_cache_[i]); | 257 FreeTransportDIB(shared_mem_cache_[i]); |
249 shared_mem_cache_[i] = NULL; | 258 shared_mem_cache_[i] = NULL; |
250 } | 259 } |
251 } | 260 } |
252 } | 261 } |
OLD | NEW |