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

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

Issue 115472: Disable plugins on the Mac by default until JS plumbing... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 11 years, 7 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 | « no previous file | webkit/tools/layout_tests/test_expectations.txt » ('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 "config.h" 5 #include "config.h"
6 6
7 #include "webkit/glue/plugins/plugin_list.h" 7 #include "webkit/glue/plugins/plugin_list.h"
8 8
9 #import <Foundation/Foundation.h> 9 #import <Foundation/Foundation.h>
10 10
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after
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); 66 LoadPlugin(path);
67 } 67 }
68 } 68 }
69 69
70 bool PluginList::ShouldLoadPlugin(const WebPluginInfo& info) { 70 bool PluginList::ShouldLoadPlugin(const WebPluginInfo& info) {
71 71 // TODO(port): uncomment the next line to enable plugins--disabled by
72 // default so that public dev builds fall back correctly to the no-plugin
73 // code on pages with plugins.
74 return false;
75
72 // Hierarchy check 76 // Hierarchy check
73 // (we're loading plugins hierarchically from Library folders, so plugins we 77 // (we're loading plugins hierarchically from Library folders, so plugins we
74 // encounter earlier must override plugins we encounter later) 78 // encounter earlier must override plugins we encounter later)
75 79
76 for (size_t i = 0; i < plugins_.size(); ++i) { 80 for (size_t i = 0; i < plugins_.size(); ++i) {
77 if (plugins_[i].path.BaseName() == info.path.BaseName()) { 81 if (plugins_[i].path.BaseName() == info.path.BaseName()) {
78 return false; // We already have a loaded plugin higher in the hierarchy. 82 return false; // We already have a loaded plugin higher in the hierarchy.
79 } 83 }
80 } 84 }
81 85
82 return true; 86 return true;
83 } 87 }
84 88
85 void PluginList::LoadInternalPlugins() { 89 void PluginList::LoadInternalPlugins() {
86 // none for now 90 // none for now
87 } 91 }
88 92
89 } // namespace NPAPI 93 } // namespace NPAPI
OLDNEW
« no previous file with comments | « no previous file | webkit/tools/layout_tests/test_expectations.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698