OLD | NEW |
| (Empty) |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | |
2 // Use of this source code is governed by a BSD-style license that can be | |
3 // found in the LICENSE file. | |
4 | |
5 #include "base/utf_string_conversions.h" | |
6 #include "chrome/common/default_plugin.h" | |
7 #include "chrome/default_plugin/plugin_main.h" | |
8 #include "webkit/plugins/npapi/plugin_list.h" | |
9 | |
10 namespace chrome { | |
11 | |
12 void RegisterInternalDefaultPlugin() { | |
13 #if defined(OS_WIN) && !defined(USE_AURA) | |
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. | |
17 // Aura isn't going to support NPAPI plugins. | |
18 const webkit::npapi::PluginEntryPoints entry_points = { | |
19 #if !defined(OS_POSIX) || defined(OS_MACOSX) | |
20 default_plugin::NP_GetEntryPoints, | |
21 #endif | |
22 default_plugin::NP_Initialize, | |
23 default_plugin::NP_Shutdown | |
24 }; | |
25 | |
26 webkit::WebPluginInfo info; | |
27 info.path = FilePath(webkit::npapi::kDefaultPluginLibraryName); | |
28 info.name = ASCIIToUTF16("Default Plug-in"); | |
29 info.version = ASCIIToUTF16("1"); | |
30 info.desc = ASCIIToUTF16("Provides functionality for installing third-party " | |
31 "plug-ins"); | |
32 | |
33 webkit::WebPluginMimeType mimeType; | |
34 mimeType.mime_type = "*"; | |
35 info.mime_types.push_back(mimeType); | |
36 | |
37 webkit::npapi::PluginList::Singleton()->RegisterInternalPlugin( | |
38 info, | |
39 entry_points, | |
40 false); | |
41 #endif | |
42 } | |
43 | |
44 } // namespace chrome | |
OLD | NEW |