OLD | NEW |
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 160 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
171 } | 171 } |
172 | 172 |
173 void PluginServiceImpl::Init() { | 173 void PluginServiceImpl::Init() { |
174 plugin_list_token_ = BrowserThread::GetBlockingPool()->GetSequenceToken(); | 174 plugin_list_token_ = BrowserThread::GetBlockingPool()->GetSequenceToken(); |
175 PluginList::Singleton()->set_will_load_plugins_callback( | 175 PluginList::Singleton()->set_will_load_plugins_callback( |
176 base::Bind(&WillLoadPluginsCallback, plugin_list_token_)); | 176 base::Bind(&WillLoadPluginsCallback, plugin_list_token_)); |
177 | 177 |
178 RegisterPepperPlugins(); | 178 RegisterPepperPlugins(); |
179 | 179 |
180 // Load any specified on the command line as well. | 180 // Load any specified on the command line as well. |
181 const CommandLine* command_line = CommandLine::ForCurrentProcess(); | 181 const base::CommandLine* command_line = |
| 182 base::CommandLine::ForCurrentProcess(); |
182 base::FilePath path = | 183 base::FilePath path = |
183 command_line->GetSwitchValuePath(switches::kLoadPlugin); | 184 command_line->GetSwitchValuePath(switches::kLoadPlugin); |
184 if (!path.empty()) | 185 if (!path.empty()) |
185 AddExtraPluginPath(path); | 186 AddExtraPluginPath(path); |
186 path = command_line->GetSwitchValuePath(switches::kExtraPluginDir); | 187 path = command_line->GetSwitchValuePath(switches::kExtraPluginDir); |
187 if (!path.empty()) | 188 if (!path.empty()) |
188 PluginList::Singleton()->AddExtraPluginDir(path); | 189 PluginList::Singleton()->AddExtraPluginDir(path); |
189 | 190 |
190 if (command_line->HasSwitch(switches::kDisablePluginsDiscovery)) | 191 if (command_line->HasSwitch(switches::kDisablePluginsDiscovery)) |
191 PluginList::Singleton()->DisablePluginsDiscovery(); | 192 PluginList::Singleton()->DisablePluginsDiscovery(); |
(...skipping 661 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
853 #endif | 854 #endif |
854 | 855 |
855 bool PluginServiceImpl::PpapiDevChannelSupported( | 856 bool PluginServiceImpl::PpapiDevChannelSupported( |
856 BrowserContext* browser_context, | 857 BrowserContext* browser_context, |
857 const GURL& document_url) { | 858 const GURL& document_url) { |
858 return content::GetContentClient()->browser()-> | 859 return content::GetContentClient()->browser()-> |
859 IsPluginAllowedToUseDevChannelAPIs(browser_context, document_url); | 860 IsPluginAllowedToUseDevChannelAPIs(browser_context, document_url); |
860 } | 861 } |
861 | 862 |
862 } // namespace content | 863 } // namespace content |
OLD | NEW |