| OLD | NEW |
| 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 "chrome/browser/dom_ui/plugins_ui.h" | 5 #include "chrome/browser/dom_ui/plugins_ui.h" |
| 6 | 6 |
| 7 #include <algorithm> | 7 #include <algorithm> |
| 8 #include <string> | 8 #include <string> |
| 9 #include <vector> | 9 #include <vector> |
| 10 | 10 |
| (...skipping 298 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 309 /////////////////////////////////////////////////////////////////////////////// | 309 /////////////////////////////////////////////////////////////////////////////// |
| 310 | 310 |
| 311 PluginsUI::PluginsUI(TabContents* contents) : DOMUI(contents) { | 311 PluginsUI::PluginsUI(TabContents* contents) : DOMUI(contents) { |
| 312 AddMessageHandler((new PluginsDOMHandler())->Attach(this)); | 312 AddMessageHandler((new PluginsDOMHandler())->Attach(this)); |
| 313 | 313 |
| 314 PluginsUIHTMLSource* html_source = new PluginsUIHTMLSource(); | 314 PluginsUIHTMLSource* html_source = new PluginsUIHTMLSource(); |
| 315 | 315 |
| 316 // Set up the chrome://plugins/ source. | 316 // Set up the chrome://plugins/ source. |
| 317 BrowserThread::PostTask( | 317 BrowserThread::PostTask( |
| 318 BrowserThread::IO, FROM_HERE, | 318 BrowserThread::IO, FROM_HERE, |
| 319 NewRunnableMethod(Singleton<ChromeURLDataManager>::get(), | 319 NewRunnableMethod(ChromeURLDataManager::GetInstance(), |
| 320 &ChromeURLDataManager::AddDataSource, | 320 &ChromeURLDataManager::AddDataSource, |
| 321 make_scoped_refptr(html_source))); | 321 make_scoped_refptr(html_source))); |
| 322 } | 322 } |
| 323 | 323 |
| 324 | 324 |
| 325 // static | 325 // static |
| 326 RefCountedMemory* PluginsUI::GetFaviconResourceBytes() { | 326 RefCountedMemory* PluginsUI::GetFaviconResourceBytes() { |
| 327 return ResourceBundle::GetSharedInstance(). | 327 return ResourceBundle::GetSharedInstance(). |
| 328 LoadDataResourceBytes(IDR_PLUGIN); | 328 LoadDataResourceBytes(IDR_PLUGIN); |
| 329 } | 329 } |
| 330 | 330 |
| 331 // static | 331 // static |
| 332 void PluginsUI::RegisterUserPrefs(PrefService* prefs) { | 332 void PluginsUI::RegisterUserPrefs(PrefService* prefs) { |
| 333 FilePath internal_dir; | 333 FilePath internal_dir; |
| 334 PathService::Get(chrome::DIR_INTERNAL_PLUGINS, &internal_dir); | 334 PathService::Get(chrome::DIR_INTERNAL_PLUGINS, &internal_dir); |
| 335 prefs->RegisterFilePathPref(prefs::kPluginsLastInternalDirectory, | 335 prefs->RegisterFilePathPref(prefs::kPluginsLastInternalDirectory, |
| 336 internal_dir); | 336 internal_dir); |
| 337 | 337 |
| 338 prefs->RegisterListPref(prefs::kPluginsPluginsBlacklist); | 338 prefs->RegisterListPref(prefs::kPluginsPluginsBlacklist); |
| 339 prefs->RegisterListPref(prefs::kPluginsPluginsList); | 339 prefs->RegisterListPref(prefs::kPluginsPluginsList); |
| 340 prefs->RegisterBooleanPref(prefs::kPluginsEnabledInternalPDF, false); | 340 prefs->RegisterBooleanPref(prefs::kPluginsEnabledInternalPDF, false); |
| 341 } | 341 } |
| OLD | NEW |