OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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_list.h" | 5 #include "content/common/plugin_list.h" |
6 | 6 |
7 #import <Carbon/Carbon.h> | 7 #import <Carbon/Carbon.h> |
8 #import <Foundation/Foundation.h> | 8 #import <Foundation/Foundation.h> |
9 | 9 |
10 #include "base/file_util.h" | 10 #include "base/file_util.h" |
11 #include "base/files/file_enumerator.h" | 11 #include "base/files/file_enumerator.h" |
12 #include "base/mac/mac_util.h" | 12 #include "base/mac/mac_util.h" |
13 #include "base/mac/scoped_cftyperef.h" | 13 #include "base/mac/scoped_cftyperef.h" |
14 #include "base/memory/scoped_ptr.h" | 14 #include "base/memory/scoped_ptr.h" |
15 #include "base/native_library.h" | 15 #include "base/native_library.h" |
16 #include "base/strings/string_number_conversions.h" | 16 #include "base/strings/string_number_conversions.h" |
17 #include "base/strings/string_split.h" | 17 #include "base/strings/string_split.h" |
18 #include "base/strings/string_util.h" | 18 #include "base/strings/string_util.h" |
19 #include "base/strings/sys_string_conversions.h" | 19 #include "base/strings/sys_string_conversions.h" |
20 #include "base/strings/utf_string_conversions.h" | 20 #include "base/strings/utf_string_conversions.h" |
21 | 21 |
22 using base::ScopedCFTypeRef; | 22 using base::ScopedCFTypeRef; |
| 23 using webkit::WebPluginInfo; |
| 24 using webkit::WebPluginMimeType; |
23 | 25 |
24 namespace webkit { | 26 namespace content { |
25 namespace npapi { | |
26 | 27 |
27 namespace { | 28 namespace { |
28 | 29 |
29 void GetPluginCommonDirectory(std::vector<base::FilePath>* plugin_dirs, | 30 void GetPluginCommonDirectory(std::vector<base::FilePath>* plugin_dirs, |
30 bool user) { | 31 bool user) { |
31 // Note that there are no NSSearchPathDirectory constants for these | 32 // Note that there are no NSSearchPathDirectory constants for these |
32 // directories so we can't use Cocoa's NSSearchPathForDirectoriesInDomains(). | 33 // directories so we can't use Cocoa's NSSearchPathForDirectoriesInDomains(). |
33 // Interestingly, Safari hard-codes the location (see | 34 // Interestingly, Safari hard-codes the location (see |
34 // WebKit/WebKit/mac/Plugins/WebPluginDatabase.mm's +_defaultPlugInPaths). | 35 // WebKit/WebKit/mac/Plugins/WebPluginDatabase.mm's +_defaultPlugInPaths). |
35 FSRef ref; | 36 FSRef ref; |
(...skipping 258 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
294 plugins->push_back(path); | 295 plugins->push_back(path); |
295 } | 296 } |
296 } | 297 } |
297 | 298 |
298 bool PluginList::ShouldLoadPluginUsingPluginList( | 299 bool PluginList::ShouldLoadPluginUsingPluginList( |
299 const WebPluginInfo& info, | 300 const WebPluginInfo& info, |
300 std::vector<webkit::WebPluginInfo>* plugins) { | 301 std::vector<webkit::WebPluginInfo>* plugins) { |
301 return !IsBlacklistedPlugin(info); | 302 return !IsBlacklistedPlugin(info); |
302 } | 303 } |
303 | 304 |
304 } // namespace npapi | 305 } // namespace content |
305 } // namespace webkit | |
OLD | NEW |