| 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 538 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 549 GetProfile()->GetOriginalProfile()->GetExtensionsService(); | 549 GetProfile()->GetOriginalProfile()->GetExtensionsService(); |
| 550 | 550 |
| 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 g_browser_process->io_thread()->message_loop()->PostTask(FROM_HERE, | 558 g_browser_process->io_thread()->message_loop()->PostTask(FROM_HERE, |
| 559 NewRunnableMethod(&chrome_url_data_manager, | 559 NewRunnableMethod(Singleton<ChromeURLDataManager>().get(), |
| 560 &ChromeURLDataManager::AddDataSource, html_source)); | 560 &ChromeURLDataManager::AddDataSource, html_source)); |
| 561 } | 561 } |
| 562 | 562 |
| 563 // static | 563 // static |
| 564 RefCountedMemory* ExtensionsUI::GetFaviconResourceBytes() { | 564 RefCountedMemory* ExtensionsUI::GetFaviconResourceBytes() { |
| 565 return ResourceBundle::GetSharedInstance(). | 565 return ResourceBundle::GetSharedInstance(). |
| 566 LoadImageResourceBytes(IDR_PLUGIN); | 566 LoadImageResourceBytes(IDR_PLUGIN); |
| 567 } | 567 } |
| 568 | 568 |
| 569 // static | 569 // static |
| 570 void ExtensionsUI::RegisterUserPrefs(PrefService* prefs) { | 570 void ExtensionsUI::RegisterUserPrefs(PrefService* prefs) { |
| 571 prefs->RegisterBooleanPref(prefs::kExtensionsUIDeveloperMode, false); | 571 prefs->RegisterBooleanPref(prefs::kExtensionsUIDeveloperMode, false); |
| 572 } | 572 } |
| OLD | NEW |