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 563 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
574 const std::string kPluginExtension = ".plugin"; | 574 const std::string kPluginExtension = ".plugin"; |
575 if (EndsWith(plugin_name, ASCIIToUTF16(kPluginExtension), true)) | 575 if (EndsWith(plugin_name, ASCIIToUTF16(kPluginExtension), true)) |
576 plugin_name.erase(plugin_name.length() - kPluginExtension.length()); | 576 plugin_name.erase(plugin_name.length() - kPluginExtension.length()); |
577 #endif // OS_MACOSX | 577 #endif // OS_MACOSX |
578 } | 578 } |
579 return plugin_name; | 579 return plugin_name; |
580 } | 580 } |
581 | 581 |
582 void PluginServiceImpl::GetPlugins(const GetPluginsCallback& callback) { | 582 void PluginServiceImpl::GetPlugins(const GetPluginsCallback& callback) { |
583 scoped_refptr<base::MessageLoopProxy> target_loop( | 583 scoped_refptr<base::MessageLoopProxy> target_loop( |
584 MessageLoop::current()->message_loop_proxy()); | 584 base::MessageLoop::current()->message_loop_proxy()); |
585 | 585 |
586 if (LoadPluginListInProcess()) { | 586 if (LoadPluginListInProcess()) { |
587 BrowserThread::GetBlockingPool()-> | 587 BrowserThread::GetBlockingPool()-> |
588 PostSequencedWorkerTaskWithShutdownBehavior( | 588 PostSequencedWorkerTaskWithShutdownBehavior( |
589 plugin_list_token_, | 589 plugin_list_token_, |
590 FROM_HERE, | 590 FROM_HERE, |
591 base::Bind(&PluginServiceImpl::GetPluginsInternal, | 591 base::Bind(&PluginServiceImpl::GetPluginsInternal, |
592 base::Unretained(this), | 592 base::Unretained(this), |
593 target_loop, callback), | 593 target_loop, callback), |
594 base::SequencedWorkerPool::SKIP_ON_SHUTDOWN); | 594 base::SequencedWorkerPool::SKIP_ON_SHUTDOWN); |
(...skipping 189 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 |