Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(280)

Side by Side Diff: webkit/glue/plugins/plugin_lib.cc

Issue 1141009: Add a UseResFile call in Mac plugin loading (Closed)
Patch Set: Created 10 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 "webkit/glue/plugins/plugin_lib.h" 5 #include "webkit/glue/plugins/plugin_lib.h"
6 6
7 #include "base/logging.h" 7 #include "base/logging.h"
8 #include "base/message_loop.h" 8 #include "base/message_loop.h"
9 #include "base/stats_counters.h" 9 #include "base/stats_counters.h"
10 #include "base/string_util.h" 10 #include "base/string_util.h"
(...skipping 155 matching lines...) Expand 10 before | Expand all | Expand 10 after
166 base::NativeLibrary library = 0; 166 base::NativeLibrary library = 0;
167 167
168 if (!internal_) { 168 if (!internal_) {
169 if (library_ != 0) 169 if (library_ != 0)
170 return rv; 170 return rv;
171 171
172 library = base::LoadNativeLibrary(web_plugin_info_.path); 172 library = base::LoadNativeLibrary(web_plugin_info_.path);
173 if (library == 0) 173 if (library == 0)
174 return rv; 174 return rv;
175 175
176 #if defined(OS_MACOSX)
177 // According to the WebKit source, QuickTime at least requires us to call
178 // UseResFile on the plugin resources before loading.
179 if (library->bundle_resource_ref != -1)
180 UseResFile(library->bundle_resource_ref);
181 #endif
182
176 rv = true; // assume success now 183 rv = true; // assume success now
177 184
178 entry_points_.np_initialize = 185 entry_points_.np_initialize =
179 (NP_InitializeFunc)base::GetFunctionPointerFromNativeLibrary(library, 186 (NP_InitializeFunc)base::GetFunctionPointerFromNativeLibrary(library,
180 "NP_Initialize"); 187 "NP_Initialize");
181 if (entry_points_.np_initialize == 0) 188 if (entry_points_.np_initialize == 0)
182 rv = false; 189 rv = false;
183 190
184 #if defined(OS_WIN) || defined(OS_MACOSX) 191 #if defined(OS_WIN) || defined(OS_MACOSX)
185 entry_points_.np_getentrypoints = 192 entry_points_.np_getentrypoints =
(...skipping 92 matching lines...) Expand 10 before | Expand all | Expand 10 after
278 } 285 }
279 286
280 void PluginLib::Shutdown() { 287 void PluginLib::Shutdown() {
281 if (initialized_ && !internal_) { 288 if (initialized_ && !internal_) {
282 NP_Shutdown(); 289 NP_Shutdown();
283 initialized_ = false; 290 initialized_ = false;
284 } 291 }
285 } 292 }
286 293
287 } // namespace NPAPI 294 } // namespace NPAPI
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698