| 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 #include "chrome/browser/plugin_service.h" | 7 #include "chrome/browser/plugin_service.h" |
| 8 | 8 |
| 9 #include "base/command_line.h" | 9 #include "base/command_line.h" |
| 10 #include "base/path_service.h" | 10 #include "base/path_service.h" |
| (...skipping 208 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 219 return NULL; | 219 return NULL; |
| 220 } | 220 } |
| 221 | 221 |
| 222 return plugin_host; | 222 return plugin_host; |
| 223 } | 223 } |
| 224 | 224 |
| 225 void PluginService::OpenChannelToPlugin( | 225 void PluginService::OpenChannelToPlugin( |
| 226 ResourceMessageFilter* renderer_msg_filter, | 226 ResourceMessageFilter* renderer_msg_filter, |
| 227 const GURL& url, | 227 const GURL& url, |
| 228 const std::string& mime_type, | 228 const std::string& mime_type, |
| 229 const std::wstring& locale, | 229 const std::string& locale, |
| 230 IPC::Message* reply_msg) { | 230 IPC::Message* reply_msg) { |
| 231 DCHECK(ChromeThread::CurrentlyOn(ChromeThread::IO)); | 231 DCHECK(ChromeThread::CurrentlyOn(ChromeThread::IO)); |
| 232 bool allow_wildcard = true; | 232 bool allow_wildcard = true; |
| 233 WebPluginInfo info; | 233 WebPluginInfo info; |
| 234 FilePath plugin_path; | 234 FilePath plugin_path; |
| 235 if (NPAPI::PluginList::Singleton()->GetPluginInfo( | 235 if (NPAPI::PluginList::Singleton()->GetPluginInfo( |
| 236 url, mime_type, allow_wildcard, &info, NULL) && info.enabled) { | 236 url, mime_type, allow_wildcard, &info, NULL) && info.enabled) { |
| 237 plugin_path = info.path; | 237 plugin_path = info.path; |
| 238 } | 238 } |
| 239 PluginProcessHost* plugin_host = FindOrStartPluginProcess(plugin_path); | 239 PluginProcessHost* plugin_host = FindOrStartPluginProcess(plugin_path); |
| (...skipping 116 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 356 info.mime_types = ASCIIToWide(JoinString(plugins[i].mime_types, '|')); | 356 info.mime_types = ASCIIToWide(JoinString(plugins[i].mime_types, '|')); |
| 357 | 357 |
| 358 // These NPAPI entry points will never be called. TODO(darin): Come up | 358 // These NPAPI entry points will never be called. TODO(darin): Come up |
| 359 // with a cleaner way to register pepper plugins with the NPAPI PluginList, | 359 // with a cleaner way to register pepper plugins with the NPAPI PluginList, |
| 360 // or perhaps refactor the PluginList to be less specific to NPAPI. | 360 // or perhaps refactor the PluginList to be less specific to NPAPI. |
| 361 memset(&info.entry_points, 0, sizeof(info.entry_points)); | 361 memset(&info.entry_points, 0, sizeof(info.entry_points)); |
| 362 | 362 |
| 363 NPAPI::PluginList::Singleton()->RegisterInternalPlugin(info); | 363 NPAPI::PluginList::Singleton()->RegisterInternalPlugin(info); |
| 364 } | 364 } |
| 365 } | 365 } |
| OLD | NEW |