| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 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 | 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 #import <Carbon/Carbon.h> | 5 #import <Carbon/Carbon.h> |
| 6 | 6 |
| 7 #include "webkit/plugins/npapi/plugin_lib.h" | 7 #include "webkit/plugins/npapi/plugin_lib.h" |
| 8 | 8 |
| 9 #include "base/mac/scoped_cftyperef.h" | 9 #include "base/mac/scoped_cftyperef.h" |
| 10 #include "base/memory/scoped_ptr.h" | 10 #include "base/memory/scoped_ptr.h" |
| (...skipping 107 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 118 info->name = base::SysNSStringToUTF16(plugin_name); | 118 info->name = base::SysNSStringToUTF16(plugin_name); |
| 119 else | 119 else |
| 120 info->name = UTF8ToUTF16(filename.BaseName().value()); | 120 info->name = UTF8ToUTF16(filename.BaseName().value()); |
| 121 info->path = filename; | 121 info->path = filename; |
| 122 if (plugin_vers) | 122 if (plugin_vers) |
| 123 info->version = base::SysNSStringToUTF16(plugin_vers); | 123 info->version = base::SysNSStringToUTF16(plugin_vers); |
| 124 if (plugin_desc) | 124 if (plugin_desc) |
| 125 info->desc = base::SysNSStringToUTF16(plugin_desc); | 125 info->desc = base::SysNSStringToUTF16(plugin_desc); |
| 126 else | 126 else |
| 127 info->desc = UTF8ToUTF16(filename.BaseName().value()); | 127 info->desc = UTF8ToUTF16(filename.BaseName().value()); |
| 128 info->enabled = WebPluginInfo::USER_ENABLED; |
| 128 | 129 |
| 129 return true; | 130 return true; |
| 130 } | 131 } |
| 131 | 132 |
| 132 } // anonymous namespace | 133 } // anonymous namespace |
| 133 | 134 |
| 134 bool PluginLib::ReadWebPluginInfo(const FilePath &filename, | 135 bool PluginLib::ReadWebPluginInfo(const FilePath &filename, |
| 135 WebPluginInfo* info) { | 136 WebPluginInfo* info) { |
| 136 // There are three ways to get information about plugin capabilities: | 137 // There are three ways to get information about plugin capabilities: |
| 137 // 1) a set of Info.plist keys, documented at | 138 // 1) a set of Info.plist keys, documented at |
| (...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 200 if (ReadPlistPluginInfo(filename, bundle.get(), info)) | 201 if (ReadPlistPluginInfo(filename, bundle.get(), info)) |
| 201 return true; | 202 return true; |
| 202 | 203 |
| 203 // ... or not | 204 // ... or not |
| 204 | 205 |
| 205 return false; | 206 return false; |
| 206 } | 207 } |
| 207 | 208 |
| 208 } // namespace npapi | 209 } // namespace npapi |
| 209 } // namespace webkit | 210 } // namespace webkit |
| OLD | NEW |