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 "content/browser/plugin_service.h" | 5 #include "content/browser/plugin_service.h" |
6 | 6 |
7 #include "base/bind.h" | 7 #include "base/bind.h" |
8 #include "base/command_line.h" | 8 #include "base/command_line.h" |
9 #include "base/compiler_specific.h" | 9 #include "base/compiler_specific.h" |
10 #include "base/file_path.h" | 10 #include "base/file_path.h" |
(...skipping 314 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
325 return PpapiPluginProcessHost::CreateBrokerHost(*info); | 325 return PpapiPluginProcessHost::CreateBrokerHost(*info); |
326 } | 326 } |
327 | 327 |
328 void PluginService::OpenChannelToNpapiPlugin( | 328 void PluginService::OpenChannelToNpapiPlugin( |
329 int render_process_id, | 329 int render_process_id, |
330 int render_view_id, | 330 int render_view_id, |
331 const GURL& url, | 331 const GURL& url, |
332 const GURL& page_url, | 332 const GURL& page_url, |
333 const std::string& mime_type, | 333 const std::string& mime_type, |
334 PluginProcessHost::Client* client) { | 334 PluginProcessHost::Client* client) { |
| 335 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO)); |
335 DCHECK(!ContainsKey(pending_plugin_clients_, client)); | 336 DCHECK(!ContainsKey(pending_plugin_clients_, client)); |
336 pending_plugin_clients_.insert(client); | 337 pending_plugin_clients_.insert(client); |
337 | 338 |
338 // Make sure plugins are loaded if necessary. | 339 // Make sure plugins are loaded if necessary. |
339 content::PluginServiceFilterParams params = { | 340 content::PluginServiceFilterParams params = { |
340 render_process_id, | 341 render_process_id, |
341 render_view_id, | 342 render_view_id, |
342 page_url, | 343 page_url, |
343 &client->GetResourceContext() | 344 &client->GetResourceContext() |
344 }; | 345 }; |
(...skipping 304 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
649 plugin_list_ = plugin_list; | 650 plugin_list_ = plugin_list; |
650 } | 651 } |
651 | 652 |
652 void PluginService::RegisterInternalPlugin(const webkit::WebPluginInfo& info) { | 653 void PluginService::RegisterInternalPlugin(const webkit::WebPluginInfo& info) { |
653 plugin_list()->RegisterInternalPlugin(info); | 654 plugin_list()->RegisterInternalPlugin(info); |
654 } | 655 } |
655 | 656 |
656 string16 PluginService::GetPluginGroupName(const std::string& plugin_name) { | 657 string16 PluginService::GetPluginGroupName(const std::string& plugin_name) { |
657 return plugin_list()->GetPluginGroupName(plugin_name); | 658 return plugin_list()->GetPluginGroupName(plugin_name); |
658 } | 659 } |
OLD | NEW |