OLD | NEW |
(Empty) | |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. |
| 4 |
| 5 #ifndef CONTENT_BROWSER_PLUGIN_FILTER_H_ |
| 6 #define CONTENT_BROWSER_PLUGIN_FILTER_H_ |
| 7 #pragma once |
| 8 |
| 9 class GURL; |
| 10 |
| 11 namespace webkit { |
| 12 namespace npapi { |
| 13 struct WebPluginInfo; |
| 14 } |
| 15 } |
| 16 |
| 17 namespace content { |
| 18 |
| 19 class ResourceContext; |
| 20 |
| 21 // Callback class to let the client filter the list of all installed plug-ins. |
| 22 // This class is called on the FILE thread. |
| 23 class PluginServiceFilter { |
| 24 public: |
| 25 virtual ~PluginServiceFilter() {} |
| 26 // Whether to use |plugin|. The client can return false to disallow the |
| 27 // plugin, or return true and optionally change the passed in plugin. |
| 28 virtual bool ShouldUsePlugin( |
| 29 int render_process_id, |
| 30 int render_view_id, |
| 31 const ResourceContext& resource_context, |
| 32 const GURL& url, |
| 33 const GURL& policy_url, |
| 34 webkit::npapi::WebPluginInfo* plugin) const = 0; |
| 35 }; |
| 36 |
| 37 } // namespace content |
| 38 |
| 39 #endif // CONTENT_BROWSER_PLUGIN_FILTER_H_ |
OLD | NEW |