| 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/extensions/extensions_ui.h" | 5 #include "chrome/browser/extensions/extensions_ui.h" |
| 6 | 6 |
| 7 #include <algorithm> | 7 #include <algorithm> |
| 8 | 8 |
| 9 #include "app/l10n_util.h" | 9 #include "app/l10n_util.h" |
| 10 #include "app/resource_bundle.h" | 10 #include "app/resource_bundle.h" |
| (...skipping 925 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 936 ExtensionsDOMHandler* handler = new ExtensionsDOMHandler(exstension_service); | 936 ExtensionsDOMHandler* handler = new ExtensionsDOMHandler(exstension_service); |
| 937 AddMessageHandler(handler); | 937 AddMessageHandler(handler); |
| 938 handler->Attach(this); | 938 handler->Attach(this); |
| 939 | 939 |
| 940 ExtensionsUIHTMLSource* html_source = new ExtensionsUIHTMLSource(); | 940 ExtensionsUIHTMLSource* html_source = new ExtensionsUIHTMLSource(); |
| 941 | 941 |
| 942 // Set up the chrome://extensions/ source. | 942 // Set up the chrome://extensions/ source. |
| 943 BrowserThread::PostTask( | 943 BrowserThread::PostTask( |
| 944 BrowserThread::IO, FROM_HERE, | 944 BrowserThread::IO, FROM_HERE, |
| 945 NewRunnableMethod( | 945 NewRunnableMethod( |
| 946 Singleton<ChromeURLDataManager>::get(), | 946 ChromeURLDataManager::GetInstance(), |
| 947 &ChromeURLDataManager::AddDataSource, | 947 &ChromeURLDataManager::AddDataSource, |
| 948 make_scoped_refptr(html_source))); | 948 make_scoped_refptr(html_source))); |
| 949 } | 949 } |
| 950 | 950 |
| 951 // static | 951 // static |
| 952 RefCountedMemory* ExtensionsUI::GetFaviconResourceBytes() { | 952 RefCountedMemory* ExtensionsUI::GetFaviconResourceBytes() { |
| 953 return ResourceBundle::GetSharedInstance(). | 953 return ResourceBundle::GetSharedInstance(). |
| 954 LoadDataResourceBytes(IDR_PLUGIN); | 954 LoadDataResourceBytes(IDR_PLUGIN); |
| 955 } | 955 } |
| 956 | 956 |
| 957 // static | 957 // static |
| 958 void ExtensionsUI::RegisterUserPrefs(PrefService* prefs) { | 958 void ExtensionsUI::RegisterUserPrefs(PrefService* prefs) { |
| 959 prefs->RegisterBooleanPref(prefs::kExtensionsUIDeveloperMode, false); | 959 prefs->RegisterBooleanPref(prefs::kExtensionsUIDeveloperMode, false); |
| 960 } | 960 } |
| OLD | NEW |