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

Side by Side Diff: chrome/plugin/plugin_thread.cc

Issue 87012: plugins: move NativeLibrary into base. (Closed)
Patch Set: more fixes from trybot Created 11 years, 8 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
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 <windows.h> 5 #include <windows.h>
6 #include <objbase.h> 6 #include <objbase.h>
7 7
8 #include "chrome/plugin/plugin_thread.h" 8 #include "chrome/plugin/plugin_thread.h"
9 9
10 #include "base/command_line.h" 10 #include "base/command_line.h"
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
44 IPC_END_MESSAGE_MAP() 44 IPC_END_MESSAGE_MAP()
45 } 45 }
46 46
47 void PluginThread::Init() { 47 void PluginThread::Init() {
48 ChildThread::Init(); 48 ChildThread::Init();
49 PatchNPNFunctions(); 49 PatchNPNFunctions();
50 CoInitialize(NULL); 50 CoInitialize(NULL);
51 notification_service_.reset(new NotificationService); 51 notification_service_.reset(new NotificationService);
52 52
53 // Preload the library to avoid loading, unloading then reloading 53 // Preload the library to avoid loading, unloading then reloading
54 preloaded_plugin_module_ = NPAPI::PluginLib::LoadNativeLibrary(plugin_path_); 54 preloaded_plugin_module_ = base::LoadNativeLibrary(plugin_path_);
55 55
56 ChromePluginLib::Create(plugin_path_, GetCPBrowserFuncsForPlugin()); 56 ChromePluginLib::Create(plugin_path_, GetCPBrowserFuncsForPlugin());
57 57
58 scoped_refptr<NPAPI::PluginLib> plugin = 58 scoped_refptr<NPAPI::PluginLib> plugin =
59 NPAPI::PluginLib::CreatePluginLib(plugin_path_); 59 NPAPI::PluginLib::CreatePluginLib(plugin_path_);
60 if (plugin.get()) { 60 if (plugin.get()) {
61 plugin->NP_Initialize(); 61 plugin->NP_Initialize();
62 } 62 }
63 63
64 // Certain plugins, such as flash, steal the unhandled exception filter 64 // Certain plugins, such as flash, steal the unhandled exception filter
(...skipping 100 matching lines...) Expand 10 before | Expand all | Expand 10 after
165 } 165 }
166 166
167 if (!result || net_error != net::OK) 167 if (!result || net_error != net::OK)
168 return false; 168 return false;
169 169
170 *proxy_list = proxy_result; 170 *proxy_list = proxy_result;
171 return true; 171 return true;
172 } 172 }
173 173
174 } // namespace webkit_glue 174 } // namespace webkit_glue
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698