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 134 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
145 for (RenderProcessHost::iterator it = RenderProcessHost::AllHostsIterator(); | 145 for (RenderProcessHost::iterator it = RenderProcessHost::AllHostsIterator(); |
146 !it.IsAtEnd(); it.Advance()) { | 146 !it.IsAtEnd(); it.Advance()) { |
147 RenderProcessHost* host = it.GetCurrentValue(); | 147 RenderProcessHost* host = it.GetCurrentValue(); |
148 if (!browser_context || host->GetBrowserContext() == browser_context) | 148 if (!browser_context || host->GetBrowserContext() == browser_context) |
149 host->Send(new ViewMsg_PurgePluginListCache(reload_pages)); | 149 host->Send(new ViewMsg_PurgePluginListCache(reload_pages)); |
150 } | 150 } |
151 } | 151 } |
152 | 152 |
153 // static | 153 // static |
154 PluginServiceImpl* PluginServiceImpl::GetInstance() { | 154 PluginServiceImpl* PluginServiceImpl::GetInstance() { |
155 return Singleton<PluginServiceImpl>::get(); | 155 return base::Singleton<PluginServiceImpl>::get(); |
156 } | 156 } |
157 | 157 |
158 PluginServiceImpl::PluginServiceImpl() | 158 PluginServiceImpl::PluginServiceImpl() |
159 : npapi_plugins_enabled_(false), filter_(NULL) { | 159 : npapi_plugins_enabled_(false), filter_(NULL) { |
160 // Collect the total number of browser processes (which create | 160 // Collect the total number of browser processes (which create |
161 // PluginServiceImpl objects, to be precise). The number is used to normalize | 161 // PluginServiceImpl objects, to be precise). The number is used to normalize |
162 // the number of processes which start at least one NPAPI/PPAPI Flash process. | 162 // the number of processes which start at least one NPAPI/PPAPI Flash process. |
163 static bool counted = false; | 163 static bool counted = false; |
164 if (!counted) { | 164 if (!counted) { |
165 counted = true; | 165 counted = true; |
(...skipping 700 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
866 #endif | 866 #endif |
867 | 867 |
868 bool PluginServiceImpl::PpapiDevChannelSupported( | 868 bool PluginServiceImpl::PpapiDevChannelSupported( |
869 BrowserContext* browser_context, | 869 BrowserContext* browser_context, |
870 const GURL& document_url) { | 870 const GURL& document_url) { |
871 return GetContentClient()->browser()->IsPluginAllowedToUseDevChannelAPIs( | 871 return GetContentClient()->browser()->IsPluginAllowedToUseDevChannelAPIs( |
872 browser_context, document_url); | 872 browser_context, document_url); |
873 } | 873 } |
874 | 874 |
875 } // namespace content | 875 } // namespace content |
OLD | NEW |