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

Side by Side Diff: webkit/support/webkit_support_glue.cc

Issue 7497030: PluginList cleanup (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix crash Created 9 years, 4 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/support/webkit_support.cc ('k') | webkit/tools/test_shell/test_shell.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) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 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/webkit_glue.h" 5 #include "webkit/glue/webkit_glue.h"
6 6
7 #include "base/base_paths.h" 7 #include "base/base_paths.h"
8 #include "base/path_service.h" 8 #include "base/path_service.h"
9 #include "googleurl/src/gurl.h" 9 #include "googleurl/src/gurl.h"
10 #include "webkit/glue/user_agent.h" 10 #include "webkit/glue/user_agent.h"
11 #include "webkit/plugins/npapi/plugin_list.h" 11 #include "webkit/plugins/npapi/plugin_list.h"
12 12
13 // Functions needed by webkit_glue. 13 // Functions needed by webkit_glue.
14 14
15 namespace webkit_glue { 15 namespace webkit_glue {
16 16
17 void GetPlugins(bool refresh, 17 void GetPlugins(bool refresh,
18 std::vector<webkit::npapi::WebPluginInfo>* plugins) { 18 std::vector<webkit::npapi::WebPluginInfo>* plugins) {
19 webkit::npapi::PluginList::Singleton()->GetPlugins(refresh, plugins); 19 if (refresh)
20 webkit::npapi::PluginList::Singleton()->RefreshPlugins();
21 webkit::npapi::PluginList::Singleton()->GetPlugins(plugins);
20 // Don't load the forked npapi_layout_test_plugin in DRT, we only want to 22 // Don't load the forked npapi_layout_test_plugin in DRT, we only want to
21 // use the upstream version TestNetscapePlugIn. 23 // use the upstream version TestNetscapePlugIn.
22 const FilePath::StringType kPluginBlackList[] = { 24 const FilePath::StringType kPluginBlackList[] = {
23 FILE_PATH_LITERAL("npapi_layout_test_plugin.dll"), 25 FILE_PATH_LITERAL("npapi_layout_test_plugin.dll"),
24 FILE_PATH_LITERAL("WebKitTestNetscapePlugIn.plugin"), 26 FILE_PATH_LITERAL("WebKitTestNetscapePlugIn.plugin"),
25 FILE_PATH_LITERAL("libnpapi_layout_test_plugin.so"), 27 FILE_PATH_LITERAL("libnpapi_layout_test_plugin.so"),
26 }; 28 };
27 for (int i = plugins->size() - 1; i >= 0; --i) { 29 for (int i = plugins->size() - 1; i >= 0; --i) {
28 webkit::npapi::WebPluginInfo plugin_info = plugins->at(i); 30 webkit::npapi::WebPluginInfo plugin_info = plugins->at(i);
29 for (size_t j = 0; j < arraysize(kPluginBlackList); ++j) { 31 for (size_t j = 0; j < arraysize(kPluginBlackList); ++j) {
(...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after
97 return -1; 99 return -1;
98 } 100 }
99 101
100 bool GetFontTable(int fd, uint32_t table, uint8_t* output, 102 bool GetFontTable(int fd, uint32_t table, uint8_t* output,
101 size_t* output_length) { 103 size_t* output_length) {
102 return false; 104 return false;
103 } 105 }
104 #endif 106 #endif
105 107
106 } // namespace webkit_glue 108 } // namespace webkit_glue
OLDNEW
« no previous file with comments | « webkit/support/webkit_support.cc ('k') | webkit/tools/test_shell/test_shell.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698