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 CHROME_BROWSER_PLUGINS_CHROME_PLUGIN_SERVICE_FILTER_H_ | 5 #ifndef CHROME_BROWSER_PLUGINS_CHROME_PLUGIN_SERVICE_FILTER_H_ |
6 #define CHROME_BROWSER_PLUGINS_CHROME_PLUGIN_SERVICE_FILTER_H_ | 6 #define CHROME_BROWSER_PLUGINS_CHROME_PLUGIN_SERVICE_FILTER_H_ |
7 | 7 |
8 #include <map> | 8 #include <map> |
9 #include <set> | 9 #include <set> |
10 #include <vector> | 10 #include <vector> |
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
51 // Lifts a restriction on a plug-in. | 51 // Lifts a restriction on a plug-in. |
52 void UnrestrictPlugin(const FilePath& plugin_path); | 52 void UnrestrictPlugin(const FilePath& plugin_path); |
53 | 53 |
54 // Authorizes a given plug-in for a given process. | 54 // Authorizes a given plug-in for a given process. |
55 void AuthorizePlugin(int render_process_id, const FilePath& plugin_path); | 55 void AuthorizePlugin(int render_process_id, const FilePath& plugin_path); |
56 | 56 |
57 // Authorizes all plug-ins for a given process. | 57 // Authorizes all plug-ins for a given process. |
58 void AuthorizeAllPlugins(int render_process_id); | 58 void AuthorizeAllPlugins(int render_process_id); |
59 | 59 |
60 // PluginServiceFilter implementation: | 60 // PluginServiceFilter implementation: |
61 virtual bool IsPluginEnabled( | 61 virtual bool IsPluginAvailable( |
62 int render_process_id, | 62 int render_process_id, |
63 int render_view_id, | 63 int render_view_id, |
64 const void* context, | 64 const void* context, |
65 const GURL& url, | 65 const GURL& url, |
66 const GURL& policy_url, | 66 const GURL& policy_url, |
67 webkit::WebPluginInfo* plugin) OVERRIDE; | 67 webkit::WebPluginInfo* plugin) OVERRIDE; |
68 | 68 |
69 // CanLoadPlugin always grants permission to the browser | 69 // CanLoadPlugin always grants permission to the browser |
70 // (render_process_id == 0) | 70 // (render_process_id == 0) |
71 virtual bool CanLoadPlugin( | 71 virtual bool CanLoadPlugin( |
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
110 typedef std::pair<const void*, GURL> RestrictedPluginPair; | 110 typedef std::pair<const void*, GURL> RestrictedPluginPair; |
111 typedef base::hash_map<FilePath, RestrictedPluginPair> RestrictedPluginMap; | 111 typedef base::hash_map<FilePath, RestrictedPluginPair> RestrictedPluginMap; |
112 RestrictedPluginMap restricted_plugins_; | 112 RestrictedPluginMap restricted_plugins_; |
113 typedef std::map<const void*, scoped_refptr<PluginPrefs> > ResourceContextMap; | 113 typedef std::map<const void*, scoped_refptr<PluginPrefs> > ResourceContextMap; |
114 ResourceContextMap resource_context_map_; | 114 ResourceContextMap resource_context_map_; |
115 | 115 |
116 std::map<int, ProcessDetails> plugin_details_; | 116 std::map<int, ProcessDetails> plugin_details_; |
117 }; | 117 }; |
118 | 118 |
119 #endif // CHROME_BROWSER_PLUGINS_CHROME_PLUGIN_SERVICE_FILTER_H_ | 119 #endif // CHROME_BROWSER_PLUGINS_CHROME_PLUGIN_SERVICE_FILTER_H_ |
OLD | NEW |