| 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 718 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 729 } | 729 } |
| 730 | 730 |
| 731 void PluginServiceImpl::RefreshPlugins() { | 731 void PluginServiceImpl::RefreshPlugins() { |
| 732 PluginList::Singleton()->RefreshPlugins(); | 732 PluginList::Singleton()->RefreshPlugins(); |
| 733 } | 733 } |
| 734 | 734 |
| 735 void PluginServiceImpl::AddExtraPluginPath(const base::FilePath& path) { | 735 void PluginServiceImpl::AddExtraPluginPath(const base::FilePath& path) { |
| 736 if (!NPAPIPluginsSupported()) { | 736 if (!NPAPIPluginsSupported()) { |
| 737 // TODO(jam): remove and just have CHECK once we're sure this doesn't get | 737 // TODO(jam): remove and just have CHECK once we're sure this doesn't get |
| 738 // triggered. | 738 // triggered. |
| 739 DLOG(INFO) << "NPAPI plugins not supported"; | 739 DVLOG(0) << "NPAPI plugins not supported"; |
| 740 return; | 740 return; |
| 741 } | 741 } |
| 742 PluginList::Singleton()->AddExtraPluginPath(path); | 742 PluginList::Singleton()->AddExtraPluginPath(path); |
| 743 } | 743 } |
| 744 | 744 |
| 745 void PluginServiceImpl::RemoveExtraPluginPath(const base::FilePath& path) { | 745 void PluginServiceImpl::RemoveExtraPluginPath(const base::FilePath& path) { |
| 746 PluginList::Singleton()->RemoveExtraPluginPath(path); | 746 PluginList::Singleton()->RemoveExtraPluginPath(path); |
| 747 } | 747 } |
| 748 | 748 |
| 749 void PluginServiceImpl::AddExtraPluginDir(const base::FilePath& path) { | 749 void PluginServiceImpl::AddExtraPluginDir(const base::FilePath& path) { |
| 750 PluginList::Singleton()->AddExtraPluginDir(path); | 750 PluginList::Singleton()->AddExtraPluginDir(path); |
| 751 } | 751 } |
| 752 | 752 |
| 753 void PluginServiceImpl::RegisterInternalPlugin( | 753 void PluginServiceImpl::RegisterInternalPlugin( |
| 754 const WebPluginInfo& info, | 754 const WebPluginInfo& info, |
| 755 bool add_at_beginning) { | 755 bool add_at_beginning) { |
| 756 if (!NPAPIPluginsSupported() && | 756 if (!NPAPIPluginsSupported() && |
| 757 info.type == WebPluginInfo::PLUGIN_TYPE_NPAPI) { | 757 info.type == WebPluginInfo::PLUGIN_TYPE_NPAPI) { |
| 758 DLOG(INFO) << "Don't register NPAPI plugins when they're not supported"; | 758 DVLOG(0) << "Don't register NPAPI plugins when they're not supported"; |
| 759 return; | 759 return; |
| 760 } | 760 } |
| 761 PluginList::Singleton()->RegisterInternalPlugin(info, add_at_beginning); | 761 PluginList::Singleton()->RegisterInternalPlugin(info, add_at_beginning); |
| 762 } | 762 } |
| 763 | 763 |
| 764 void PluginServiceImpl::UnregisterInternalPlugin(const base::FilePath& path) { | 764 void PluginServiceImpl::UnregisterInternalPlugin(const base::FilePath& path) { |
| 765 PluginList::Singleton()->UnregisterInternalPlugin(path); | 765 PluginList::Singleton()->UnregisterInternalPlugin(path); |
| 766 } | 766 } |
| 767 | 767 |
| 768 void PluginServiceImpl::GetInternalPlugins( | 768 void PluginServiceImpl::GetInternalPlugins( |
| (...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 819 window, kPluginVersionAtomProperty, plugin_version); | 819 window, kPluginVersionAtomProperty, plugin_version); |
| 820 return true; | 820 return true; |
| 821 } | 821 } |
| 822 | 822 |
| 823 bool PluginServiceImpl::IsPluginWindow(HWND window) { | 823 bool PluginServiceImpl::IsPluginWindow(HWND window) { |
| 824 return gfx::GetClassName(window) == base::string16(kNativeWindowClassName); | 824 return gfx::GetClassName(window) == base::string16(kNativeWindowClassName); |
| 825 } | 825 } |
| 826 #endif | 826 #endif |
| 827 | 827 |
| 828 } // namespace content | 828 } // namespace content |
| OLD | NEW |