| 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/files/file_path.h" | 10 #include "base/files/file_path.h" |
| (...skipping 585 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 596 } | 596 } |
| 597 #if defined(OS_POSIX) | 597 #if defined(OS_POSIX) |
| 598 std::vector<webkit::WebPluginInfo> cached_plugins; | 598 std::vector<webkit::WebPluginInfo> cached_plugins; |
| 599 if (plugin_list_->GetPluginsNoRefresh(&cached_plugins)) { | 599 if (plugin_list_->GetPluginsNoRefresh(&cached_plugins)) { |
| 600 // Can't assume the caller is reentrant. | 600 // Can't assume the caller is reentrant. |
| 601 target_loop->PostTask(FROM_HERE, | 601 target_loop->PostTask(FROM_HERE, |
| 602 base::Bind(callback, cached_plugins)); | 602 base::Bind(callback, cached_plugins)); |
| 603 } else { | 603 } else { |
| 604 // If we switch back to loading plugins in process, then we need to make | 604 // If we switch back to loading plugins in process, then we need to make |
| 605 // sure g_thread_init() gets called since plugins may call glib at load. | 605 // sure g_thread_init() gets called since plugins may call glib at load. |
| 606 if (!plugin_loader_) | 606 if (!plugin_loader_.get()) |
| 607 plugin_loader_ = new PluginLoaderPosix; | 607 plugin_loader_ = new PluginLoaderPosix; |
| 608 BrowserThread::PostTask(BrowserThread::IO, FROM_HERE, | 608 BrowserThread::PostTask(BrowserThread::IO, FROM_HERE, |
| 609 base::Bind(&PluginLoaderPosix::LoadPlugins, plugin_loader_, | 609 base::Bind(&PluginLoaderPosix::LoadPlugins, plugin_loader_, |
| 610 target_loop, callback)); | 610 target_loop, callback)); |
| 611 } | 611 } |
| 612 #else | 612 #else |
| 613 NOTREACHED(); | 613 NOTREACHED(); |
| 614 #endif | 614 #endif |
| 615 } | 615 } |
| 616 | 616 |
| (...skipping 167 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 784 void PluginServiceImpl::GetInternalPlugins( | 784 void PluginServiceImpl::GetInternalPlugins( |
| 785 std::vector<webkit::WebPluginInfo>* plugins) { | 785 std::vector<webkit::WebPluginInfo>* plugins) { |
| 786 plugin_list_->GetInternalPlugins(plugins); | 786 plugin_list_->GetInternalPlugins(plugins); |
| 787 } | 787 } |
| 788 | 788 |
| 789 webkit::npapi::PluginList* PluginServiceImpl::GetPluginList() { | 789 webkit::npapi::PluginList* PluginServiceImpl::GetPluginList() { |
| 790 return plugin_list_; | 790 return plugin_list_; |
| 791 } | 791 } |
| 792 | 792 |
| 793 } // namespace content | 793 } // namespace content |
| OLD | NEW |