Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(374)

Side by Side Diff: webkit/glue/plugins/plugin_list.h

Issue 200031: Take out the activex control. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 11 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « webkit/glue/plugins/plugin_constants_win.h ('k') | webkit/glue/plugins/plugin_list.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2006-2008 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 WEBKIT_GLUE_PLUGIN_PLUGIN_LIST_H__ 5 #ifndef WEBKIT_GLUE_PLUGIN_PLUGIN_LIST_H__
6 #define WEBKIT_GLUE_PLUGIN_PLUGIN_LIST_H__ 6 #define WEBKIT_GLUE_PLUGIN_PLUGIN_LIST_H__
7 7
8 #include <set> 8 #include <set>
9 #include <string> 9 #include <string>
10 #include <vector> 10 #include <vector>
(...skipping 100 matching lines...) Expand 10 before | Expand all | Expand 10 after
111 // Get all the plugins 111 // Get all the plugins
112 void GetPlugins(bool refresh, std::vector<WebPluginInfo>* plugins); 112 void GetPlugins(bool refresh, std::vector<WebPluginInfo>* plugins);
113 113
114 // Returns true if a plugin is found for the given url and mime type. 114 // Returns true if a plugin is found for the given url and mime type.
115 // The mime type which corresponds to the URL is optionally returned 115 // The mime type which corresponds to the URL is optionally returned
116 // back. 116 // back.
117 // The allow_wildcard parameter controls whether this function returns 117 // The allow_wildcard parameter controls whether this function returns
118 // plugins which support wildcard mime types (* as the mime type). 118 // plugins which support wildcard mime types (* as the mime type).
119 bool GetPluginInfo(const GURL& url, 119 bool GetPluginInfo(const GURL& url,
120 const std::string& mime_type, 120 const std::string& mime_type,
121 const std::string& clsid,
122 bool allow_wildcard, 121 bool allow_wildcard,
123 WebPluginInfo* info, 122 WebPluginInfo* info,
124 std::string* actual_mime_type); 123 std::string* actual_mime_type);
125 124
126 // Get plugin info by plugin path. Returns true if the plugin is found and 125 // Get plugin info by plugin path. Returns true if the plugin is found and
127 // WebPluginInfo has been filled in |info|. 126 // WebPluginInfo has been filled in |info|.
128 bool GetPluginInfoByPath(const FilePath& plugin_path, 127 bool GetPluginInfoByPath(const FilePath& plugin_path,
129 WebPluginInfo* info); 128 WebPluginInfo* info);
130 129
131 // Load a specific plugin with full path. 130 // Load a specific plugin with full path.
(...skipping 10 matching lines...) Expand all
142 // Load all plugins from a specific directory 141 // Load all plugins from a specific directory
143 void LoadPluginsFromDir(const FilePath& path, 142 void LoadPluginsFromDir(const FilePath& path,
144 std::vector<WebPluginInfo>* plugins); 143 std::vector<WebPluginInfo>* plugins);
145 144
146 // Returns true if we should load the given plugin, or false otherwise. 145 // Returns true if we should load the given plugin, or false otherwise.
147 // plugins is the list of plugins we have crawled in the current plugin 146 // plugins is the list of plugins we have crawled in the current plugin
148 // loading run. 147 // loading run.
149 bool ShouldLoadPlugin(const WebPluginInfo& info, 148 bool ShouldLoadPlugin(const WebPluginInfo& info,
150 std::vector<WebPluginInfo>* plugins); 149 std::vector<WebPluginInfo>* plugins);
151 150
152 // Load internal plugins. 151 // Find a plugin by mime type.
153 void LoadInternalPlugins(std::vector<WebPluginInfo>* plugins);
154
155 // Find a plugin by mime type, and clsid.
156 // If clsid is empty, we will just find the plugin that supports mime type.
157 // Otherwise, if mime_type is application/x-oleobject etc that's supported by
158 // by our activex shim, we need to check if the specified ActiveX exists.
159 // If not we will not return the activex shim, instead we will let the
160 // default plugin handle activex installation.
161 // The allow_wildcard parameter controls whether this function returns 152 // The allow_wildcard parameter controls whether this function returns
162 // plugins which support wildcard mime types (* as the mime type) 153 // plugins which support wildcard mime types (* as the mime type)
163 bool FindPlugin(const std::string &mime_type, const std::string& clsid, 154 bool FindPlugin(const std::string &mime_type,
164 bool allow_wildcard, WebPluginInfo* info); 155 bool allow_wildcard,
156 WebPluginInfo* info);
165 157
166 // Find a plugin by extension. Returns the corresponding mime type. 158 // Find a plugin by extension. Returns the corresponding mime type.
167 bool FindPlugin(const GURL &url, std::string* actual_mime_type, 159 bool FindPlugin(const GURL &url,
160 std::string* actual_mime_type,
168 WebPluginInfo* info); 161 WebPluginInfo* info);
169 162
170 // Returns true if the given WebPluginInfo supports "mime-type". 163 // Returns true if the given WebPluginInfo supports "mime-type".
171 // mime_type should be all lower case. 164 // mime_type should be all lower case.
172 static bool SupportsType(const WebPluginInfo& info, 165 static bool SupportsType(const WebPluginInfo& info,
173 const std::string &mime_type, 166 const std::string &mime_type,
174 bool allow_wildcard); 167 bool allow_wildcard);
175 168
176 // Returns true if the given WebPluginInfo supports a given file extension. 169 // Returns true if the given WebPluginInfo supports a given file extension.
177 // extension should be all lower case. 170 // extension should be all lower case.
(...skipping 14 matching lines...) Expand all
192 // Get the ordered list of directories from which to load plugins 185 // Get the ordered list of directories from which to load plugins
193 void GetPluginDirectories(std::vector<FilePath>* plugin_dirs); 186 void GetPluginDirectories(std::vector<FilePath>* plugin_dirs);
194 187
195 // 188 //
196 // Command-line switches 189 // Command-line switches
197 // 190 //
198 191
199 #if defined(OS_WIN) 192 #if defined(OS_WIN)
200 // true if we shouldn't load the new WMP plugin. 193 // true if we shouldn't load the new WMP plugin.
201 bool dont_load_new_wmp_; 194 bool dont_load_new_wmp_;
202
203 // true if we should use our internal ActiveX shim
204 bool use_internal_activex_shim_;
205 #endif 195 #endif
206 196
207 // 197 //
208 // Internals 198 // Internals
209 // 199 //
210 200
211 bool plugins_loaded_; 201 bool plugins_loaded_;
212 202
213 // Contains information about the available plugins. 203 // Contains information about the available plugins.
214 std::vector<WebPluginInfo> plugins_; 204 std::vector<WebPluginInfo> plugins_;
(...skipping 12 matching lines...) Expand all
227 Lock lock_; 217 Lock lock_;
228 218
229 friend struct base::DefaultLazyInstanceTraits<PluginList>; 219 friend struct base::DefaultLazyInstanceTraits<PluginList>;
230 220
231 DISALLOW_COPY_AND_ASSIGN(PluginList); 221 DISALLOW_COPY_AND_ASSIGN(PluginList);
232 }; 222 };
233 223
234 } // namespace NPAPI 224 } // namespace NPAPI
235 225
236 #endif // WEBKIT_GLUE_PLUGIN_PLUGIN_LIST_H__ 226 #endif // WEBKIT_GLUE_PLUGIN_PLUGIN_LIST_H__
OLDNEW
« no previous file with comments | « webkit/glue/plugins/plugin_constants_win.h ('k') | webkit/glue/plugins/plugin_list.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698