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 #ifndef CONTENT_PUBLIC_BROWSER_PLUGIN_SERVICE_FILTER_H_ | 5 #ifndef CONTENT_PUBLIC_BROWSER_PLUGIN_SERVICE_FILTER_H_ |
6 #define CONTENT_PUBLIC_BROWSER_PLUGIN_SERVICE_FILTER_H_ | 6 #define CONTENT_PUBLIC_BROWSER_PLUGIN_SERVICE_FILTER_H_ |
7 | 7 |
8 class GURL; | 8 class GURL; |
9 | 9 |
10 namespace webkit { | 10 namespace webkit { |
11 struct WebPluginInfo; | 11 struct WebPluginInfo; |
12 } | 12 } |
13 | 13 |
14 namespace content { | 14 namespace content { |
15 | 15 |
16 // Callback class to let the client filter the list of all installed plug-ins. | 16 // Callback class to let the client filter the list of all installed plug-ins |
17 // and block them from being loaded. | |
17 // This class is called on the FILE thread. | 18 // This class is called on the FILE thread. |
18 class PluginServiceFilter { | 19 class PluginServiceFilter { |
19 public: | 20 public: |
20 virtual ~PluginServiceFilter() {} | 21 virtual ~PluginServiceFilter() {} |
21 | 22 |
22 // Whether to use |plugin|. The client can return false to disallow the | 23 // Whether |plugin| is enabled. The client can return false to hide the |
23 // plugin, or return true and optionally change the passed in plugin. | 24 // plugin, or return true and optionally change the passed in plugin. |
24 virtual bool ShouldUsePlugin(int render_process_id, | 25 virtual bool IsPluginEnabled(int render_process_id, |
Bernhard Bauer
2013/02/04 13:58:53
Naming bikeshedding comment: I think this confuses
| |
25 int render_view_id, | 26 int render_view_id, |
26 const void* context, | 27 const void* context, |
27 const GURL& url, | 28 const GURL& url, |
28 const GURL& policy_url, | 29 const GURL& policy_url, |
29 webkit::WebPluginInfo* plugin) = 0; | 30 webkit::WebPluginInfo* plugin) = 0; |
31 | |
32 // Whether the renderer has permission to load enabled |plugin|. | |
33 virtual bool CanLoadPlugin(int render_process_id, | |
34 const FilePath& path) = 0; | |
30 }; | 35 }; |
31 | 36 |
32 } // namespace content | 37 } // namespace content |
33 | 38 |
34 #endif // CONTENT_PUBLIC_BROWSER_PLUGIN_SERVICE_FILTER_H_ | 39 #endif // CONTENT_PUBLIC_BROWSER_PLUGIN_SERVICE_FILTER_H_ |
OLD | NEW |