| OLD | NEW |
| 1 // Copyright (c) 2006-2009 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2006-2009 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/extensions/extensions_ui.h" | 5 #include "chrome/browser/extensions/extensions_ui.h" |
| 6 | 6 |
| 7 #include "app/l10n_util.h" | 7 #include "app/l10n_util.h" |
| 8 #include "app/resource_bundle.h" | 8 #include "app/resource_bundle.h" |
| 9 #include "base/string_util.h" | 9 #include "base/string_util.h" |
| 10 #include "base/thread.h" | 10 #include "base/thread.h" |
| (...skipping 540 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 551 ExtensionsDOMHandler* handler = new ExtensionsDOMHandler(exstension_service); | 551 ExtensionsDOMHandler* handler = new ExtensionsDOMHandler(exstension_service); |
| 552 AddMessageHandler(handler); | 552 AddMessageHandler(handler); |
| 553 handler->Attach(this); | 553 handler->Attach(this); |
| 554 | 554 |
| 555 ExtensionsUIHTMLSource* html_source = new ExtensionsUIHTMLSource(); | 555 ExtensionsUIHTMLSource* html_source = new ExtensionsUIHTMLSource(); |
| 556 | 556 |
| 557 // Set up the chrome://extensions/ source. | 557 // Set up the chrome://extensions/ source. |
| 558 ChromeThread::PostTask( | 558 ChromeThread::PostTask( |
| 559 ChromeThread::IO, FROM_HERE, | 559 ChromeThread::IO, FROM_HERE, |
| 560 NewRunnableMethod( | 560 NewRunnableMethod( |
| 561 &chrome_url_data_manager, &ChromeURLDataManager::AddDataSource, | 561 Singleton<ChromeURLDataManager>().get(), |
| 562 &ChromeURLDataManager::AddDataSource, |
| 562 html_source)); | 563 html_source)); |
| 563 } | 564 } |
| 564 | 565 |
| 565 // static | 566 // static |
| 566 RefCountedMemory* ExtensionsUI::GetFaviconResourceBytes() { | 567 RefCountedMemory* ExtensionsUI::GetFaviconResourceBytes() { |
| 567 return ResourceBundle::GetSharedInstance(). | 568 return ResourceBundle::GetSharedInstance(). |
| 568 LoadImageResourceBytes(IDR_PLUGIN); | 569 LoadImageResourceBytes(IDR_PLUGIN); |
| 569 } | 570 } |
| 570 | 571 |
| 571 // static | 572 // static |
| 572 void ExtensionsUI::RegisterUserPrefs(PrefService* prefs) { | 573 void ExtensionsUI::RegisterUserPrefs(PrefService* prefs) { |
| 573 prefs->RegisterBooleanPref(prefs::kExtensionsUIDeveloperMode, false); | 574 prefs->RegisterBooleanPref(prefs::kExtensionsUIDeveloperMode, false); |
| 574 } | 575 } |
| OLD | NEW |