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; | |
129 | 128 |
130 return true; | 129 return true; |
131 } | 130 } |
132 | 131 |
133 } // anonymous namespace | 132 } // anonymous namespace |
134 | 133 |
135 bool PluginLib::ReadWebPluginInfo(const FilePath &filename, | 134 bool PluginLib::ReadWebPluginInfo(const FilePath &filename, |
136 WebPluginInfo* info) { | 135 WebPluginInfo* info) { |
137 // There are three ways to get information about plugin capabilities: | 136 // There are three ways to get information about plugin capabilities: |
138 // 1) a set of Info.plist keys, documented at | 137 // 1) a set of Info.plist keys, documented at |
(...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
201 if (ReadPlistPluginInfo(filename, bundle.get(), info)) | 200 if (ReadPlistPluginInfo(filename, bundle.get(), info)) |
202 return true; | 201 return true; |
203 | 202 |
204 // ... or not | 203 // ... or not |
205 | 204 |
206 return false; | 205 return false; |
207 } | 206 } |
208 | 207 |
209 } // namespace npapi | 208 } // namespace npapi |
210 } // namespace webkit | 209 } // namespace webkit |
OLD | NEW |