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.cc

Issue 100180: Added audio/mpeg and video/mpeg to the list of mime types supported by the Ac... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 11 years, 7 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
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 #include "config.h" 5 #include "config.h"
6 6
7 #include "webkit/glue/plugins/plugin_list.h" 7 #include "webkit/glue/plugins/plugin_list.h"
8 8
9 #include "base/lazy_instance.h" 9 #include "base/lazy_instance.h"
10 #include "base/logging.h" 10 #include "base/logging.h"
(...skipping 138 matching lines...) Expand 10 before | Expand all | Expand 10 after
149 149
150 void PluginList::LoadPlugins(bool refresh) { 150 void PluginList::LoadPlugins(bool refresh) {
151 if (plugins_loaded_ && !refresh) 151 if (plugins_loaded_ && !refresh)
152 return; 152 return;
153 153
154 plugins_.clear(); 154 plugins_.clear();
155 plugins_loaded_ = true; 155 plugins_loaded_ = true;
156 156
157 base::TimeTicks start_time = base::TimeTicks::Now(); 157 base::TimeTicks start_time = base::TimeTicks::Now();
158 158
159 LoadInternalPlugins();
160
161 std::vector<FilePath> directories_to_scan; 159 std::vector<FilePath> directories_to_scan;
162 GetPluginDirectories(&directories_to_scan); 160 GetPluginDirectories(&directories_to_scan);
163 161
164 for (size_t i = 0; i < directories_to_scan.size(); ++i) { 162 for (size_t i = 0; i < directories_to_scan.size(); ++i) {
165 LoadPluginsFromDir(directories_to_scan[i]); 163 LoadPluginsFromDir(directories_to_scan[i]);
166 } 164 }
167 165
168 for (size_t i = 0; i < extra_plugin_dirs_.size(); ++i) { 166 for (size_t i = 0; i < extra_plugin_dirs_.size(); ++i) {
169 LoadPluginsFromDir(extra_plugin_dirs_[i]); 167 LoadPluginsFromDir(extra_plugin_dirs_[i]);
170 } 168 }
171 169
172 for (size_t i = 0; i < extra_plugin_paths_.size(); ++i) 170 for (size_t i = 0; i < extra_plugin_paths_.size(); ++i)
173 LoadPlugin(extra_plugin_paths_[i]); 171 LoadPlugin(extra_plugin_paths_[i]);
174 172
175 if (webkit_glue::IsDefaultPluginEnabled()) 173 if (webkit_glue::IsDefaultPluginEnabled())
176 LoadPlugin(FilePath(kDefaultPluginLibraryName)); 174 LoadPlugin(FilePath(kDefaultPluginLibraryName));
177 175
176 LoadInternalPlugins();
177
178 base::TimeTicks end_time = base::TimeTicks::Now(); 178 base::TimeTicks end_time = base::TimeTicks::Now();
179 base::TimeDelta elapsed = end_time - start_time; 179 base::TimeDelta elapsed = end_time - start_time;
180 DLOG(INFO) << "Loaded plugin list in " << elapsed.InMilliseconds() << " ms."; 180 DLOG(INFO) << "Loaded plugin list in " << elapsed.InMilliseconds() << " ms.";
181 } 181 }
182 182
183 void PluginList::LoadPlugin(const FilePath &path) { 183 void PluginList::LoadPlugin(const FilePath &path) {
184 WebPluginInfo plugin_info; 184 WebPluginInfo plugin_info;
185 const PluginEntryPoints* entry_points; 185 const PluginEntryPoints* entry_points;
186 186
187 if (!ReadPluginInfo(path, &plugin_info, &entry_points)) 187 if (!ReadPluginInfo(path, &plugin_info, &entry_points))
(...skipping 144 matching lines...) Expand 10 before | Expand all | Expand 10 after
332 } 332 }
333 333
334 return false; 334 return false;
335 } 335 }
336 336
337 void PluginList::Shutdown() { 337 void PluginList::Shutdown() {
338 // TODO 338 // TODO
339 } 339 }
340 340
341 } // namespace NPAPI 341 } // namespace NPAPI
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698