| 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/renderer_host/render_message_filter.h" | 5 #include "content/browser/renderer_host/render_message_filter.h" |
| 6 | 6 |
| 7 #include <map> | 7 #include <map> |
| 8 | 8 |
| 9 #include "base/bind.h" | 9 #include "base/bind.h" |
| 10 #include "base/bind_helpers.h" | 10 #include "base/bind_helpers.h" |
| (...skipping 655 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 666 const std::vector<webkit::WebPluginInfo>& all_plugins) { | 666 const std::vector<webkit::WebPluginInfo>& all_plugins) { |
| 667 // Filter the plugin list. | 667 // Filter the plugin list. |
| 668 PluginServiceFilter* filter = PluginServiceImpl::GetInstance()->GetFilter(); | 668 PluginServiceFilter* filter = PluginServiceImpl::GetInstance()->GetFilter(); |
| 669 std::vector<webkit::WebPluginInfo> plugins; | 669 std::vector<webkit::WebPluginInfo> plugins; |
| 670 | 670 |
| 671 int child_process_id = -1; | 671 int child_process_id = -1; |
| 672 int routing_id = MSG_ROUTING_NONE; | 672 int routing_id = MSG_ROUTING_NONE; |
| 673 for (size_t i = 0; i < all_plugins.size(); ++i) { | 673 for (size_t i = 0; i < all_plugins.size(); ++i) { |
| 674 // Copy because the filter can mutate. | 674 // Copy because the filter can mutate. |
| 675 webkit::WebPluginInfo plugin(all_plugins[i]); | 675 webkit::WebPluginInfo plugin(all_plugins[i]); |
| 676 if (!filter || filter->IsPluginEnabled(child_process_id, | 676 if (!filter || filter->IsPluginAvailable(child_process_id, |
| 677 routing_id, | 677 routing_id, |
| 678 resource_context_, | 678 resource_context_, |
| 679 GURL(), | 679 GURL(), |
| 680 GURL(), | 680 GURL(), |
| 681 &plugin)) { | 681 &plugin)) { |
| 682 plugins.push_back(plugin); | 682 plugins.push_back(plugin); |
| 683 } | 683 } |
| 684 } | 684 } |
| 685 | 685 |
| 686 ViewHostMsg_GetPlugins::WriteReplyParams(reply_msg, plugins); | 686 ViewHostMsg_GetPlugins::WriteReplyParams(reply_msg, plugins); |
| 687 Send(reply_msg); | 687 Send(reply_msg); |
| 688 } | 688 } |
| 689 | 689 |
| 690 void RenderMessageFilter::OnGetPluginInfo( | 690 void RenderMessageFilter::OnGetPluginInfo( |
| 691 int routing_id, | 691 int routing_id, |
| (...skipping 455 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1147 | 1147 |
| 1148 HENHMETAFILE metafile = CloseEnhMetaFile(hdc); | 1148 HENHMETAFILE metafile = CloseEnhMetaFile(hdc); |
| 1149 | 1149 |
| 1150 if (metafile) { | 1150 if (metafile) { |
| 1151 DeleteEnhMetaFile(metafile); | 1151 DeleteEnhMetaFile(metafile); |
| 1152 } | 1152 } |
| 1153 } | 1153 } |
| 1154 #endif | 1154 #endif |
| 1155 | 1155 |
| 1156 } // namespace content | 1156 } // namespace content |
| OLD | NEW |