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
3 // found in the LICENSE file.
5 #ifndef CONTENT_PUBLIC_BROWSER_PLUGIN_SERVICE_FILTER_H_
6 #define CONTENT_PUBLIC_BROWSER_PLUGIN_SERVICE_FILTER_H_
17 // Callback class to let the client filter the list of all installed plug-ins
18 // and block them from being loaded.
19 // This class is called on the FILE thread.
20 class PluginServiceFilter {
22 virtual ~PluginServiceFilter() {}
24 // Whether |plugin| is available. The client can return false to hide the
25 // plugin, or return true and optionally change the passed in plugin.
26 virtual bool IsPluginAvailable(int render_process_id,
30 const GURL& policy_url,
31 WebPluginInfo* plugin) = 0;
33 // Whether the renderer has permission to load available |plugin|.
34 virtual bool CanLoadPlugin(int render_process_id,
35 const base::FilePath& path) = 0;
38 } // namespace content
40 #endif // CONTENT_PUBLIC_BROWSER_PLUGIN_SERVICE_FILTER_H_