| 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 86 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 97 chrome::RegisterInternalDefaultPlugin(); | 97 chrome::RegisterInternalDefaultPlugin(); |
| 98 | 98 |
| 99 // Register the internal Flash and PDF, if available. | 99 // Register the internal Flash and PDF, if available. |
| 100 if (!CommandLine::ForCurrentProcess()->HasSwitch( | 100 if (!CommandLine::ForCurrentProcess()->HasSwitch( |
| 101 switches::kDisableInternalFlash) && | 101 switches::kDisableInternalFlash) && |
| 102 PathService::Get(chrome::FILE_FLASH_PLUGIN, &path)) { | 102 PathService::Get(chrome::FILE_FLASH_PLUGIN, &path)) { |
| 103 NPAPI::PluginList::Singleton()->AddExtraPluginPath(path); | 103 NPAPI::PluginList::Singleton()->AddExtraPluginPath(path); |
| 104 } | 104 } |
| 105 | 105 |
| 106 #ifndef DISABLE_NACL | 106 #ifndef DISABLE_NACL |
| 107 if (command_line->HasSwitch(switches::kInternalNaCl)) | 107 RegisterInternalNaClPlugin(); |
| 108 RegisterInternalNaClPlugin(); | |
| 109 #endif | 108 #endif |
| 110 | 109 |
| 111 chrome::RegisterInternalGPUPlugin(); | 110 chrome::RegisterInternalGPUPlugin(); |
| 112 | 111 |
| 113 #if defined(OS_WIN) | 112 #if defined(OS_WIN) |
| 114 hkcu_key_.Create( | 113 hkcu_key_.Create( |
| 115 HKEY_CURRENT_USER, kRegistryMozillaPlugins, KEY_NOTIFY); | 114 HKEY_CURRENT_USER, kRegistryMozillaPlugins, KEY_NOTIFY); |
| 116 hklm_key_.Create( | 115 hklm_key_.Create( |
| 117 HKEY_LOCAL_MACHINE, kRegistryMozillaPlugins, KEY_NOTIFY); | 116 HKEY_LOCAL_MACHINE, kRegistryMozillaPlugins, KEY_NOTIFY); |
| 118 if (hkcu_key_.StartWatching()) { | 117 if (hkcu_key_.StartWatching()) { |
| (...skipping 249 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 368 info.mime_types = ASCIIToWide(JoinString(plugins[i].mime_types, '|')); | 367 info.mime_types = ASCIIToWide(JoinString(plugins[i].mime_types, '|')); |
| 369 | 368 |
| 370 // These NPAPI entry points will never be called. TODO(darin): Come up | 369 // These NPAPI entry points will never be called. TODO(darin): Come up |
| 371 // with a cleaner way to register pepper plugins with the NPAPI PluginList, | 370 // with a cleaner way to register pepper plugins with the NPAPI PluginList, |
| 372 // or perhaps refactor the PluginList to be less specific to NPAPI. | 371 // or perhaps refactor the PluginList to be less specific to NPAPI. |
| 373 memset(&info.entry_points, 0, sizeof(info.entry_points)); | 372 memset(&info.entry_points, 0, sizeof(info.entry_points)); |
| 374 | 373 |
| 375 NPAPI::PluginList::Singleton()->RegisterInternalPlugin(info); | 374 NPAPI::PluginList::Singleton()->RegisterInternalPlugin(info); |
| 376 } | 375 } |
| 377 } | 376 } |
| OLD | NEW |