| 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 "chrome/common/default_plugin.h" | 5 #include "chrome/common/default_plugin.h" |
| 6 | 6 |
| 7 #include "chrome/default_plugin/plugin_main.h" | 7 #include "chrome/default_plugin/plugin_main.h" |
| 8 #include "webkit/plugins/npapi/plugin_list.h" | 8 #include "webkit/plugins/npapi/plugin_list.h" |
| 9 | 9 |
| 10 namespace chrome { | 10 namespace chrome { |
| 11 | 11 |
| 12 void RegisterInternalDefaultPlugin() { | 12 void RegisterInternalDefaultPlugin() { |
| 13 #if defined(OS_WIN) |
| 14 // TODO(bauerb): On Windows the default plug-in can download and install |
| 15 // missing plug-ins, which we don't support in the browser yet, so keep |
| 16 // using the default plug-in on Windows until we do. |
| 13 const webkit::npapi::PluginEntryPoints entry_points = { | 17 const webkit::npapi::PluginEntryPoints entry_points = { |
| 14 #if !defined(OS_POSIX) || defined(OS_MACOSX) | 18 #if !defined(OS_POSIX) || defined(OS_MACOSX) |
| 15 default_plugin::NP_GetEntryPoints, | 19 default_plugin::NP_GetEntryPoints, |
| 16 #endif | 20 #endif |
| 17 default_plugin::NP_Initialize, | 21 default_plugin::NP_Initialize, |
| 18 default_plugin::NP_Shutdown | 22 default_plugin::NP_Shutdown |
| 19 }; | 23 }; |
| 20 | 24 |
| 21 webkit::npapi::PluginList::Singleton()->RegisterInternalPlugin( | 25 webkit::npapi::PluginList::Singleton()->RegisterInternalPlugin( |
| 22 FilePath(webkit::npapi::kDefaultPluginLibraryName), | 26 FilePath(webkit::npapi::kDefaultPluginLibraryName), |
| 23 "Default Plug-in", | 27 "Default Plug-in", |
| 24 "Provides functionality for installing third-party plug-ins", | 28 "Provides functionality for installing third-party plug-ins", |
| 25 "*", | 29 "*", |
| 26 entry_points); | 30 entry_points); |
| 31 #endif // defined OS(WIN) |
| 27 } | 32 } |
| 28 | 33 |
| 29 } // namespace chrome | 34 } // namespace chrome |
| OLD | NEW |