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

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

Issue 2079016: Linux: Initial scaffolding for default plugin. (Closed) Base URL: http://src.chromium.org/git/chromium.git
Patch Set: comments Created 10 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
« no previous file with comments | « webkit/default_plugin/plugin_main.cc ('k') | webkit/glue/webkit_glue.gypi » ('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) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 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 "webkit/glue/plugins/plugin_list.h" 5 #include "webkit/glue/plugins/plugin_list.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
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 123 matching lines...) Expand 10 before | Expand all | Expand 10 after
134 info->mime_types.push_back(mime_type); 134 info->mime_types.push_back(mime_type);
135 } 135 }
136 136
137 return true; 137 return true;
138 } 138 }
139 139
140 PluginList::PluginList() 140 PluginList::PluginList()
141 : plugins_loaded_(false), plugins_need_refresh_(false) { 141 : plugins_loaded_(false), plugins_need_refresh_(false) {
142 PlatformInit(); 142 PlatformInit();
143 143
144 #if defined(OS_WIN) || defined(OS_MACOSX)
145 const PluginVersionInfo default_plugin = { 144 const PluginVersionInfo default_plugin = {
146 FilePath(kDefaultPluginLibraryName), 145 FilePath(kDefaultPluginLibraryName),
147 L"Default Plug-in", 146 L"Default Plug-in",
148 L"Provides functionality for installing third-party plug-ins", 147 L"Provides functionality for installing third-party plug-ins",
149 L"1", 148 L"1",
150 L"*", 149 L"*",
151 L"", 150 L"",
152 L"", 151 L"",
153 { 152 {
153 #if !defined(OS_POSIX) || defined(OS_MACOSX)
154 default_plugin::NP_GetEntryPoints, 154 default_plugin::NP_GetEntryPoints,
155 #endif
155 default_plugin::NP_Initialize, 156 default_plugin::NP_Initialize,
156 default_plugin::NP_Shutdown 157 default_plugin::NP_Shutdown
157 } 158 }
158 }; 159 };
159 160
160 internal_plugins_.push_back(default_plugin); 161 internal_plugins_.push_back(default_plugin);
161 #endif
162 } 162 }
163 163
164 void PluginList::LoadPlugins(bool refresh) { 164 void PluginList::LoadPlugins(bool refresh) {
165 // Don't want to hold the lock while loading new plugins, so we don't block 165 // Don't want to hold the lock while loading new plugins, so we don't block
166 // other methods if they're called on other threads. 166 // other methods if they're called on other threads.
167 std::vector<FilePath> extra_plugin_paths; 167 std::vector<FilePath> extra_plugin_paths;
168 std::vector<FilePath> extra_plugin_dirs; 168 std::vector<FilePath> extra_plugin_dirs;
169 std::vector<PluginVersionInfo> internal_plugins; 169 std::vector<PluginVersionInfo> internal_plugins;
170 { 170 {
171 AutoLock lock(lock_); 171 AutoLock lock(lock_);
(...skipping 294 matching lines...) Expand 10 before | Expand all | Expand 10 after
466 } 466 }
467 467
468 return did_disable; 468 return did_disable;
469 } 469 }
470 470
471 void PluginList::Shutdown() { 471 void PluginList::Shutdown() {
472 // TODO 472 // TODO
473 } 473 }
474 474
475 } // namespace NPAPI 475 } // namespace NPAPI
OLDNEW
« no previous file with comments | « webkit/default_plugin/plugin_main.cc ('k') | webkit/glue/webkit_glue.gypi » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698