| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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_impl.h" | 5 #include "content/browser/plugin_service_impl.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 324 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 335 void PluginServiceImpl::OpenChannelToPpapiPlugin( | 335 void PluginServiceImpl::OpenChannelToPpapiPlugin( |
| 336 const FilePath& plugin_path, | 336 const FilePath& plugin_path, |
| 337 const FilePath& profile_data_directory, | 337 const FilePath& profile_data_directory, |
| 338 PpapiPluginProcessHost::PluginClient* client) { | 338 PpapiPluginProcessHost::PluginClient* client) { |
| 339 PpapiPluginProcessHost* plugin_host = FindOrStartPpapiPluginProcess( | 339 PpapiPluginProcessHost* plugin_host = FindOrStartPpapiPluginProcess( |
| 340 plugin_path, profile_data_directory, client); | 340 plugin_path, profile_data_directory, client); |
| 341 if (plugin_host) { | 341 if (plugin_host) { |
| 342 plugin_host->OpenChannelToPlugin(client); | 342 plugin_host->OpenChannelToPlugin(client); |
| 343 } else { | 343 } else { |
| 344 // Send error. | 344 // Send error. |
| 345 client->OnPpapiChannelOpened(IPC::ChannelHandle(), 0); | 345 client->OnPpapiChannelOpened(IPC::ChannelHandle(), base::kNullProcessId, 0); |
| 346 } | 346 } |
| 347 } | 347 } |
| 348 | 348 |
| 349 void PluginServiceImpl::OpenChannelToPpapiBroker( | 349 void PluginServiceImpl::OpenChannelToPpapiBroker( |
| 350 const FilePath& path, | 350 const FilePath& path, |
| 351 PpapiPluginProcessHost::BrokerClient* client) { | 351 PpapiPluginProcessHost::BrokerClient* client) { |
| 352 PpapiPluginProcessHost* plugin_host = FindOrStartPpapiBrokerProcess(path); | 352 PpapiPluginProcessHost* plugin_host = FindOrStartPpapiBrokerProcess(path); |
| 353 if (plugin_host) { | 353 if (plugin_host) { |
| 354 plugin_host->OpenChannelToPlugin(client); | 354 plugin_host->OpenChannelToPlugin(client); |
| 355 } else { | 355 } else { |
| 356 // Send error. | 356 // Send error. |
| 357 client->OnPpapiChannelOpened(IPC::ChannelHandle(), 0); | 357 client->OnPpapiChannelOpened(IPC::ChannelHandle(), base::kNullProcessId, 0); |
| 358 } | 358 } |
| 359 } | 359 } |
| 360 | 360 |
| 361 void PluginServiceImpl::CancelOpenChannelToNpapiPlugin( | 361 void PluginServiceImpl::CancelOpenChannelToNpapiPlugin( |
| 362 PluginProcessHost::Client* client) { | 362 PluginProcessHost::Client* client) { |
| 363 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO)); | 363 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO)); |
| 364 DCHECK(ContainsKey(pending_plugin_clients_, client)); | 364 DCHECK(ContainsKey(pending_plugin_clients_, client)); |
| 365 pending_plugin_clients_.erase(client); | 365 pending_plugin_clients_.erase(client); |
| 366 } | 366 } |
| 367 | 367 |
| (...skipping 340 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 708 void PluginServiceImpl::GetInternalPlugins( | 708 void PluginServiceImpl::GetInternalPlugins( |
| 709 std::vector<webkit::WebPluginInfo>* plugins) { | 709 std::vector<webkit::WebPluginInfo>* plugins) { |
| 710 plugin_list_->GetInternalPlugins(plugins); | 710 plugin_list_->GetInternalPlugins(plugins); |
| 711 } | 711 } |
| 712 | 712 |
| 713 webkit::npapi::PluginList* PluginServiceImpl::GetPluginList() { | 713 webkit::npapi::PluginList* PluginServiceImpl::GetPluginList() { |
| 714 return plugin_list_; | 714 return plugin_list_; |
| 715 } | 715 } |
| 716 | 716 |
| 717 } // namespace content | 717 } // namespace content |
| OLD | NEW |