| OLD | NEW |
| 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 "build/build_config.h" | 5 #include "build/build_config.h" |
| 6 | 6 |
| 7 #include "chrome/browser/plugin_service.h" | 7 #include "chrome/browser/plugin_service.h" |
| 8 | 8 |
| 9 #include "base/command_line.h" | 9 #include "base/command_line.h" |
| 10 #include "base/path_service.h" | 10 #include "base/path_service.h" |
| (...skipping 335 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 346 plugins_changed = true; | 346 plugins_changed = true; |
| 347 if (!plugin.is_public) | 347 if (!plugin.is_public) |
| 348 private_plugins_[plugin.path] = extension->url(); | 348 private_plugins_[plugin.path] = extension->url(); |
| 349 } | 349 } |
| 350 if (plugins_changed) | 350 if (plugins_changed) |
| 351 PurgePluginListCache(false); | 351 PurgePluginListCache(false); |
| 352 break; | 352 break; |
| 353 } | 353 } |
| 354 | 354 |
| 355 case NotificationType::EXTENSION_UNLOADED: { | 355 case NotificationType::EXTENSION_UNLOADED: { |
| 356 const Extension* extension = Details<const Extension>(details).ptr(); | 356 const Extension* extension = |
| 357 Details<UnloadedExtensionInfo>(details)->extension; |
| 357 bool plugins_changed = false; | 358 bool plugins_changed = false; |
| 358 for (size_t i = 0; i < extension->plugins().size(); ++i) { | 359 for (size_t i = 0; i < extension->plugins().size(); ++i) { |
| 359 const Extension::PluginInfo& plugin = extension->plugins()[i]; | 360 const Extension::PluginInfo& plugin = extension->plugins()[i]; |
| 360 BrowserThread::PostTask(BrowserThread::IO, FROM_HERE, | 361 BrowserThread::PostTask(BrowserThread::IO, FROM_HERE, |
| 361 NewRunnableFunction(&ForceShutdownPlugin, | 362 NewRunnableFunction(&ForceShutdownPlugin, |
| 362 plugin.path)); | 363 plugin.path)); |
| 363 webkit::npapi::PluginList::Singleton()->RefreshPlugins(); | 364 webkit::npapi::PluginList::Singleton()->RefreshPlugins(); |
| 364 webkit::npapi::PluginList::Singleton()->RemoveExtraPluginPath( | 365 webkit::npapi::PluginList::Singleton()->RemoveExtraPluginPath( |
| 365 plugin.path); | 366 plugin.path); |
| 366 plugins_changed = true; | 367 plugins_changed = true; |
| (...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 420 info.mime_types = ASCIIToWide(JoinString(plugins[i].mime_types, '|')); | 421 info.mime_types = ASCIIToWide(JoinString(plugins[i].mime_types, '|')); |
| 421 | 422 |
| 422 // These NPAPI entry points will never be called. TODO(darin): Come up | 423 // These NPAPI entry points will never be called. TODO(darin): Come up |
| 423 // with a cleaner way to register pepper plugins with the NPAPI PluginList, | 424 // with a cleaner way to register pepper plugins with the NPAPI PluginList, |
| 424 // or perhaps refactor the PluginList to be less specific to NPAPI. | 425 // or perhaps refactor the PluginList to be less specific to NPAPI. |
| 425 memset(&info.entry_points, 0, sizeof(info.entry_points)); | 426 memset(&info.entry_points, 0, sizeof(info.entry_points)); |
| 426 | 427 |
| 427 webkit::npapi::PluginList::Singleton()->RegisterInternalPlugin(info); | 428 webkit::npapi::PluginList::Singleton()->RegisterInternalPlugin(info); |
| 428 } | 429 } |
| 429 } | 430 } |
| OLD | NEW |