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 "webkit/plugins/npapi/plugin_lib.h" | 5 #include "webkit/glue/plugins/plugin_lib.h" |
6 | 6 |
7 #include "base/file_version_info.h" | 7 #include "base/file_version_info.h" |
8 #include "base/file_version_info_win.h" | 8 #include "base/file_version_info_win.h" |
9 #include "base/logging.h" | 9 #include "base/logging.h" |
10 #include "base/path_service.h" | 10 #include "base/path_service.h" |
11 #include "webkit/plugins/npapi/plugin_constants_win.h" | 11 #include "webkit/glue/plugins/plugin_constants_win.h" |
12 #include "webkit/plugins/npapi/plugin_list.h" | 12 #include "webkit/glue/plugins/plugin_list.h" |
13 | 13 |
14 namespace webkit { | 14 namespace NPAPI { |
15 namespace npapi { | |
16 | 15 |
17 bool PluginLib::ReadWebPluginInfo(const FilePath &filename, | 16 bool PluginLib::ReadWebPluginInfo(const FilePath &filename, |
18 WebPluginInfo* info) { | 17 WebPluginInfo* info) { |
19 // On windows, the way we get the mime types for the library is | 18 // On windows, the way we get the mime types for the library is |
20 // to check the version information in the DLL itself. This | 19 // to check the version information in the DLL itself. This |
21 // will be a string of the format: <type1>|<type2>|<type3>|... | 20 // will be a string of the format: <type1>|<type2>|<type3>|... |
22 // For example: | 21 // For example: |
23 // video/quicktime|audio/aiff|image/jpeg | 22 // video/quicktime|audio/aiff|image/jpeg |
24 scoped_ptr<FileVersionInfo> version_info( | 23 scoped_ptr<FileVersionInfo> version_info( |
25 FileVersionInfo::CreateFileVersionInfo(filename.value())); | 24 FileVersionInfo::CreateFileVersionInfo(filename.value())); |
(...skipping 11 matching lines...) Expand all Loading... |
37 pvi.file_extensions = version_info_win->GetStringValue(L"FileExtents"); | 36 pvi.file_extensions = version_info_win->GetStringValue(L"FileExtents"); |
38 pvi.type_descriptions = version_info_win->GetStringValue(L"FileOpenName"); | 37 pvi.type_descriptions = version_info_win->GetStringValue(L"FileOpenName"); |
39 pvi.product_name = version_info->product_name(); | 38 pvi.product_name = version_info->product_name(); |
40 pvi.file_description = version_info->file_description(); | 39 pvi.file_description = version_info->file_description(); |
41 pvi.file_version = version_info->file_version(); | 40 pvi.file_version = version_info->file_version(); |
42 pvi.path = filename; | 41 pvi.path = filename; |
43 | 42 |
44 return PluginList::CreateWebPluginInfo(pvi, info); | 43 return PluginList::CreateWebPluginInfo(pvi, info); |
45 } | 44 } |
46 | 45 |
47 } // namespace npapi | 46 } // namespace NPAPI |
48 } // namespace webkit | |
OLD | NEW |