OLD | NEW |
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 Loading... |
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 Loading... |
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 |
OLD | NEW |