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

Side by Side Diff: content/browser/plugin_service_impl.cc

Issue 19381007: Remove unused includes of plugin_list.h. Also remove unused ContentClient and webkit_support method… (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 7 years, 5 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 | « chrome/renderer/plugins/plugin_placeholder.cc ('k') | content/plugin/plugin_thread.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) 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 "content/browser/plugin_service_impl.h" 5 #include "content/browser/plugin_service_impl.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/command_line.h" 8 #include "base/command_line.h"
9 #include "base/compiler_specific.h" 9 #include "base/compiler_specific.h"
10 #include "base/files/file_path.h" 10 #include "base/files/file_path.h"
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after
61 }; 61 };
62 62
63 bool LoadPluginListInProcess() { 63 bool LoadPluginListInProcess() {
64 #if defined(OS_WIN) 64 #if defined(OS_WIN)
65 return true; 65 return true;
66 #else 66 #else
67 // If on POSIX, we don't want to load the list of NPAPI plugins in-process as 67 // If on POSIX, we don't want to load the list of NPAPI plugins in-process as
68 // that causes instability. 68 // that causes instability.
69 69
70 // Can't load the plugins on the utility thread when in single process mode 70 // Can't load the plugins on the utility thread when in single process mode
71 // since that requires using WebKit and GTK and they can only be used on the 71 // since that requires GTK which can only be used on the main thread.
72 // main thread.
73 if (RenderProcessHost::run_renderer_in_process()) 72 if (RenderProcessHost::run_renderer_in_process())
74 return true; 73 return true;
75 74
76 return !webkit::npapi::NPAPIPluginsSupported(); 75 return !webkit::npapi::NPAPIPluginsSupported();
77 #endif 76 #endif
78 } 77 }
79 78
80 // Callback set on the PluginList to assert that plugin loading happens on the 79 // Callback set on the PluginList to assert that plugin loading happens on the
81 // correct thread. 80 // correct thread.
82 void WillLoadPluginsCallback( 81 void WillLoadPluginsCallback(
(...skipping 103 matching lines...) Expand 10 before | Expand all | Expand 10 after
186 ASCIIToUTF16("1.2.3.4"), 185 ASCIIToUTF16("1.2.3.4"),
187 ASCIIToUTF16("Browser Plugin.")); 186 ASCIIToUTF16("Browser Plugin."));
188 webview_plugin.type = webkit::WebPluginInfo::PLUGIN_TYPE_NPAPI; 187 webview_plugin.type = webkit::WebPluginInfo::PLUGIN_TYPE_NPAPI;
189 webkit::WebPluginMimeType webview_plugin_mime_type; 188 webkit::WebPluginMimeType webview_plugin_mime_type;
190 webview_plugin_mime_type.mime_type = "application/browser-plugin"; 189 webview_plugin_mime_type.mime_type = "application/browser-plugin";
191 webview_plugin_mime_type.file_extensions.push_back("*"); 190 webview_plugin_mime_type.file_extensions.push_back("*");
192 webview_plugin.mime_types.push_back(webview_plugin_mime_type); 191 webview_plugin.mime_types.push_back(webview_plugin_mime_type);
193 RegisterInternalPlugin(webview_plugin, true); 192 RegisterInternalPlugin(webview_plugin, true);
194 } 193 }
195 194
196 GetContentClient()->AddNPAPIPlugins(plugin_list_);
197
198 // Load any specified on the command line as well. 195 // Load any specified on the command line as well.
199 base::FilePath path = 196 base::FilePath path =
200 command_line->GetSwitchValuePath(switches::kLoadPlugin); 197 command_line->GetSwitchValuePath(switches::kLoadPlugin);
201 if (!path.empty()) 198 if (!path.empty())
202 AddExtraPluginPath(path); 199 AddExtraPluginPath(path);
203 path = command_line->GetSwitchValuePath(switches::kExtraPluginDir); 200 path = command_line->GetSwitchValuePath(switches::kExtraPluginDir);
204 if (!path.empty()) 201 if (!path.empty())
205 plugin_list_->AddExtraPluginDir(path); 202 plugin_list_->AddExtraPluginDir(path);
206 203
207 if (command_line->HasSwitch(switches::kDisablePluginsDiscovery)) 204 if (command_line->HasSwitch(switches::kDisablePluginsDiscovery))
(...skipping 586 matching lines...) Expand 10 before | Expand all | Expand 10 after
794 void PluginServiceImpl::GetInternalPlugins( 791 void PluginServiceImpl::GetInternalPlugins(
795 std::vector<webkit::WebPluginInfo>* plugins) { 792 std::vector<webkit::WebPluginInfo>* plugins) {
796 plugin_list_->GetInternalPlugins(plugins); 793 plugin_list_->GetInternalPlugins(plugins);
797 } 794 }
798 795
799 webkit::npapi::PluginList* PluginServiceImpl::GetPluginList() { 796 webkit::npapi::PluginList* PluginServiceImpl::GetPluginList() {
800 return plugin_list_; 797 return plugin_list_;
801 } 798 }
802 799
803 } // namespace content 800 } // namespace content
OLDNEW
« no previous file with comments | « chrome/renderer/plugins/plugin_placeholder.cc ('k') | content/plugin/plugin_thread.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698