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 537 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
548 ExtensionsService *exstension_service = | 548 ExtensionsService *exstension_service = |
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 ChromeThread::PostTask( |
559 NewRunnableMethod(&chrome_url_data_manager, | 559 ChromeThread::IO, FROM_HERE, |
560 &ChromeURLDataManager::AddDataSource, html_source)); | 560 NewRunnableMethod( |
| 561 &chrome_url_data_manager, &ChromeURLDataManager::AddDataSource, |
| 562 html_source)); |
561 } | 563 } |
562 | 564 |
563 // static | 565 // static |
564 RefCountedMemory* ExtensionsUI::GetFaviconResourceBytes() { | 566 RefCountedMemory* ExtensionsUI::GetFaviconResourceBytes() { |
565 return ResourceBundle::GetSharedInstance(). | 567 return ResourceBundle::GetSharedInstance(). |
566 LoadImageResourceBytes(IDR_PLUGIN); | 568 LoadImageResourceBytes(IDR_PLUGIN); |
567 } | 569 } |
568 | 570 |
569 // static | 571 // static |
570 void ExtensionsUI::RegisterUserPrefs(PrefService* prefs) { | 572 void ExtensionsUI::RegisterUserPrefs(PrefService* prefs) { |
571 prefs->RegisterBooleanPref(prefs::kExtensionsUIDeveloperMode, false); | 573 prefs->RegisterBooleanPref(prefs::kExtensionsUIDeveloperMode, false); |
572 } | 574 } |
OLD | NEW |