| 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 <stddef.h> | 7 #include <stddef.h> |
| 8 | 8 |
| 9 #include "base/bind.h" | 9 #include "base/bind.h" |
| 10 #include "base/command_line.h" | 10 #include "base/command_line.h" |
| (...skipping 159 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 170 FLASH_USAGE_ENUM_COUNT); | 170 FLASH_USAGE_ENUM_COUNT); |
| 171 } | 171 } |
| 172 } | 172 } |
| 173 | 173 |
| 174 PluginServiceImpl::~PluginServiceImpl() { | 174 PluginServiceImpl::~PluginServiceImpl() { |
| 175 // Make sure no plugin channel requests have been leaked. | 175 // Make sure no plugin channel requests have been leaked. |
| 176 DCHECK(pending_plugin_clients_.empty()); | 176 DCHECK(pending_plugin_clients_.empty()); |
| 177 } | 177 } |
| 178 | 178 |
| 179 void PluginServiceImpl::Init() { | 179 void PluginServiceImpl::Init() { |
| 180 plugin_list_token_ = BrowserThread::GetBlockingPool()->GetSequenceToken(); | 180 plugin_list_token_ = base::SequencedWorkerPool::GetSequenceToken(); |
| 181 PluginList::Singleton()->set_will_load_plugins_callback( | 181 PluginList::Singleton()->set_will_load_plugins_callback( |
| 182 base::Bind(&WillLoadPluginsCallback, plugin_list_token_)); | 182 base::Bind(&WillLoadPluginsCallback, plugin_list_token_)); |
| 183 | 183 |
| 184 RegisterPepperPlugins(); | 184 RegisterPepperPlugins(); |
| 185 | 185 |
| 186 // Load any specified on the command line as well. | 186 // Load any specified on the command line as well. |
| 187 const base::CommandLine* command_line = | 187 const base::CommandLine* command_line = |
| 188 base::CommandLine::ForCurrentProcess(); | 188 base::CommandLine::ForCurrentProcess(); |
| 189 base::FilePath path = | 189 base::FilePath path = |
| 190 command_line->GetSwitchValuePath(switches::kLoadPlugin); | 190 command_line->GetSwitchValuePath(switches::kLoadPlugin); |
| (...skipping 678 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 869 #endif | 869 #endif |
| 870 | 870 |
| 871 bool PluginServiceImpl::PpapiDevChannelSupported( | 871 bool PluginServiceImpl::PpapiDevChannelSupported( |
| 872 BrowserContext* browser_context, | 872 BrowserContext* browser_context, |
| 873 const GURL& document_url) { | 873 const GURL& document_url) { |
| 874 return GetContentClient()->browser()->IsPluginAllowedToUseDevChannelAPIs( | 874 return GetContentClient()->browser()->IsPluginAllowedToUseDevChannelAPIs( |
| 875 browser_context, document_url); | 875 browser_context, document_url); |
| 876 } | 876 } |
| 877 | 877 |
| 878 } // namespace content | 878 } // namespace content |
| OLD | NEW |