OLD | NEW |
---|---|
1 // Copyright (c) 2006-2009 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2006-2009 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 "webkit/plugins/npapi/plugin_list.h" |
6 | 6 |
7 #import <Foundation/Foundation.h> | 7 #import <Foundation/Foundation.h> |
8 | 8 |
9 #include "base/file_util.h" | 9 #include "base/file_util.h" |
10 #include "base/mac/mac_util.h" | 10 #include "base/mac/mac_util.h" |
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
67 | 67 |
68 void PluginList::PlatformInit() { | 68 void PluginList::PlatformInit() { |
69 } | 69 } |
70 | 70 |
71 void PluginList::GetPluginDirectories(std::vector<FilePath>* plugin_dirs) { | 71 void PluginList::GetPluginDirectories(std::vector<FilePath>* plugin_dirs) { |
72 // Load from the user's area | 72 // Load from the user's area |
73 GetPluginCommonDirectory(plugin_dirs, true); | 73 GetPluginCommonDirectory(plugin_dirs, true); |
74 | 74 |
75 // Load from the machine-wide area | 75 // Load from the machine-wide area |
76 GetPluginCommonDirectory(plugin_dirs, false); | 76 GetPluginCommonDirectory(plugin_dirs, false); |
77 | |
78 // 10.5 includes the Java2 plugin, but no longer has a symlink to it in | |
Mark Mentovai
2011/08/09 16:46:44
Can you make the comment a bit more specific? This
stuartmorgan1
2011/08/10 11:10:44
Done.
| |
79 // the Internet Plug-Ins directory. Manually include it since there's no | |
80 // other way to support Java. | |
81 if (base::mac::IsOSLeopard()) { | |
82 plugin_dirs->push_back(FilePath( | |
83 "/System/Library/Java/Support/Deploy.bundle/Contents/Resources/")); | |
Mark Mentovai
2011/08/09 16:46:44
Any reason for the trailing slash? This works just
stuartmorgan1
2011/08/10 11:10:44
Just copy/paste from terminal autocomplete. Remove
| |
84 } | |
77 } | 85 } |
78 | 86 |
79 void PluginList::LoadPluginsFromDir(const FilePath &path, | 87 void PluginList::LoadPluginsFromDir(const FilePath &path, |
80 ScopedVector<PluginGroup>* plugin_groups, | 88 ScopedVector<PluginGroup>* plugin_groups, |
81 std::set<FilePath>* visited_plugins) { | 89 std::set<FilePath>* visited_plugins) { |
82 file_util::FileEnumerator enumerator(path, | 90 file_util::FileEnumerator enumerator(path, |
83 false, // not recursive | 91 false, // not recursive |
84 file_util::FileEnumerator::DIRECTORIES); | 92 file_util::FileEnumerator::DIRECTORIES); |
85 for (FilePath path = enumerator.Next(); !path.value().empty(); | 93 for (FilePath path = enumerator.Next(); !path.value().empty(); |
86 path = enumerator.Next()) { | 94 path = enumerator.Next()) { |
(...skipping 18 matching lines...) Expand all Loading... | |
105 return false; // Already have a loaded plugin higher in the hierarchy. | 113 return false; // Already have a loaded plugin higher in the hierarchy. |
106 } | 114 } |
107 } | 115 } |
108 } | 116 } |
109 | 117 |
110 return true; | 118 return true; |
111 } | 119 } |
112 | 120 |
113 } // namespace npapi | 121 } // namespace npapi |
114 } // namespace webkit | 122 } // namespace webkit |
OLD | NEW |