Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(67)

Side by Side Diff: webkit/glue/plugins/plugin_list_mac.mm

Issue 207025: NaCl-Chrome integration (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 11 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « webkit/glue/plugins/plugin_list_linux.cc ('k') | webkit/glue/plugins/plugin_list_win.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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/glue/plugins/plugin_list.h" 5 #include "webkit/glue/plugins/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_util.h" 10 #include "base/mac_util.h"
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after
60 std::vector<WebPluginInfo>* plugins) { 60 std::vector<WebPluginInfo>* plugins) {
61 file_util::FileEnumerator enumerator(path, 61 file_util::FileEnumerator enumerator(path,
62 false, // not recursive 62 false, // not recursive
63 file_util::FileEnumerator::DIRECTORIES); 63 file_util::FileEnumerator::DIRECTORIES);
64 for (FilePath path = enumerator.Next(); !path.value().empty(); 64 for (FilePath path = enumerator.Next(); !path.value().empty();
65 path = enumerator.Next()) { 65 path = enumerator.Next()) {
66 LoadPlugin(path, plugins); 66 LoadPlugin(path, plugins);
67 } 67 }
68 } 68 }
69 69
70 bool PluginList::ShouldLoadPlugin(const WebPluginInfo& info, 70 bool PluginList::PlatformShouldLoadPlugin(const WebPluginInfo& info,
71 std::vector<WebPluginInfo>* plugins) { 71 std::vector<WebPluginInfo>* plugins) {
72 // The Gears plugin is Safari-specific, and causes crashes, so don't load it. 72 // The Gears plugin is Safari-specific, and causes crashes, so don't load it.
73 for (std::vector<WebPluginMimeType>::const_iterator i = 73 for (std::vector<WebPluginMimeType>::const_iterator i =
74 info.mime_types.begin(); i != info.mime_types.end(); ++i) { 74 info.mime_types.begin(); i != info.mime_types.end(); ++i) {
75 if (i->mime_type == "application/x-googlegears") 75 if (i->mime_type == "application/x-googlegears")
76 return false; 76 return false;
77 } 77 }
78 78
79 // For now, only load plugins that we know are working reasonably well. 79 // For now, only load plugins that we know are working reasonably well.
80 // Anything using QuickDraw-based drawing, for example, would crash 80 // Anything using QuickDraw-based drawing, for example, would crash
81 // immediately. 81 // immediately.
(...skipping 13 matching lines...) Expand all
95 for (size_t i = 0; i < plugins->size(); ++i) { 95 for (size_t i = 0; i < plugins->size(); ++i) {
96 if ((*plugins)[i].path.BaseName() == info.path.BaseName()) { 96 if ((*plugins)[i].path.BaseName() == info.path.BaseName()) {
97 return false; // We already have a loaded plugin higher in the hierarchy. 97 return false; // We already have a loaded plugin higher in the hierarchy.
98 } 98 }
99 } 99 }
100 100
101 return true; 101 return true;
102 } 102 }
103 103
104 } // namespace NPAPI 104 } // namespace NPAPI
OLDNEW
« no previous file with comments | « webkit/glue/plugins/plugin_list_linux.cc ('k') | webkit/glue/plugins/plugin_list_win.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698