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 640 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
651 ComputePepperPluginList(&ppapi_plugins_); | 651 ComputePepperPluginList(&ppapi_plugins_); |
652 for (size_t i = 0; i < ppapi_plugins_.size(); ++i) { | 652 for (size_t i = 0; i < ppapi_plugins_.size(); ++i) { |
653 RegisterInternalPlugin(ppapi_plugins_[i].ToWebPluginInfo(), true); | 653 RegisterInternalPlugin(ppapi_plugins_[i].ToWebPluginInfo(), true); |
654 } | 654 } |
655 } | 655 } |
656 | 656 |
657 // There should generally be very few plugins so a brute-force search is fine. | 657 // There should generally be very few plugins so a brute-force search is fine. |
658 PepperPluginInfo* PluginServiceImpl::GetRegisteredPpapiPluginInfo( | 658 PepperPluginInfo* PluginServiceImpl::GetRegisteredPpapiPluginInfo( |
659 const base::FilePath& plugin_path) { | 659 const base::FilePath& plugin_path) { |
660 PepperPluginInfo* info = NULL; | 660 PepperPluginInfo* info = NULL; |
661 for (size_t i = 0; i < ppapi_plugins_.size(); i++) { | 661 for (size_t i = 0; i < ppapi_plugins_.size(); ++i) { |
662 if (ppapi_plugins_[i].path == plugin_path) { | 662 if (ppapi_plugins_[i].path == plugin_path) { |
663 info = &ppapi_plugins_[i]; | 663 info = &ppapi_plugins_[i]; |
664 break; | 664 break; |
665 } | 665 } |
666 } | 666 } |
667 if (info) | 667 if (info) |
668 return info; | 668 return info; |
669 // We did not find the plugin in our list. But wait! the plugin can also | 669 // We did not find the plugin in our list. But wait! the plugin can also |
670 // be a latecomer, as it happens with pepper flash. This information | 670 // be a latecomer, as it happens with pepper flash. This information |
671 // can be obtained from the PluginList singleton and we can use it to | 671 // can be obtained from the PluginList singleton and we can use it to |
(...skipping 163 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
835 window, kPluginVersionAtomProperty, plugin_version); | 835 window, kPluginVersionAtomProperty, plugin_version); |
836 return true; | 836 return true; |
837 } | 837 } |
838 | 838 |
839 bool PluginServiceImpl::IsPluginWindow(HWND window) { | 839 bool PluginServiceImpl::IsPluginWindow(HWND window) { |
840 return gfx::GetClassName(window) == base::string16(kNativeWindowClassName); | 840 return gfx::GetClassName(window) == base::string16(kNativeWindowClassName); |
841 } | 841 } |
842 #endif | 842 #endif |
843 | 843 |
844 } // namespace content | 844 } // namespace content |
OLD | NEW |