| 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 "base/base64.h" | 9 #include "base/base64.h" |
| 10 #include "base/callback.h" | 10 #include "base/callback.h" |
| (...skipping 941 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 952 ExtensionService *exstension_service = | 952 ExtensionService *exstension_service = |
| 953 GetProfile()->GetOriginalProfile()->GetExtensionService(); | 953 GetProfile()->GetOriginalProfile()->GetExtensionService(); |
| 954 | 954 |
| 955 ExtensionsDOMHandler* handler = new ExtensionsDOMHandler(exstension_service); | 955 ExtensionsDOMHandler* handler = new ExtensionsDOMHandler(exstension_service); |
| 956 AddMessageHandler(handler); | 956 AddMessageHandler(handler); |
| 957 handler->Attach(this); | 957 handler->Attach(this); |
| 958 | 958 |
| 959 ExtensionsUIHTMLSource* html_source = new ExtensionsUIHTMLSource(); | 959 ExtensionsUIHTMLSource* html_source = new ExtensionsUIHTMLSource(); |
| 960 | 960 |
| 961 // Set up the chrome://extensions/ source. | 961 // Set up the chrome://extensions/ source. |
| 962 BrowserThread::PostTask( | 962 contents->profile()->GetChromeURLDataManager()->AddDataSource(html_source); |
| 963 BrowserThread::IO, FROM_HERE, | |
| 964 NewRunnableMethod( | |
| 965 ChromeURLDataManager::GetInstance(), | |
| 966 &ChromeURLDataManager::AddDataSource, | |
| 967 make_scoped_refptr(html_source))); | |
| 968 } | 963 } |
| 969 | 964 |
| 970 // static | 965 // static |
| 971 RefCountedMemory* ExtensionsUI::GetFaviconResourceBytes() { | 966 RefCountedMemory* ExtensionsUI::GetFaviconResourceBytes() { |
| 972 return ResourceBundle::GetSharedInstance(). | 967 return ResourceBundle::GetSharedInstance(). |
| 973 LoadDataResourceBytes(IDR_PLUGIN); | 968 LoadDataResourceBytes(IDR_PLUGIN); |
| 974 } | 969 } |
| 975 | 970 |
| 976 // static | 971 // static |
| 977 void ExtensionsUI::RegisterUserPrefs(PrefService* prefs) { | 972 void ExtensionsUI::RegisterUserPrefs(PrefService* prefs) { |
| 978 prefs->RegisterBooleanPref(prefs::kExtensionsUIDeveloperMode, false); | 973 prefs->RegisterBooleanPref(prefs::kExtensionsUIDeveloperMode, false); |
| 979 } | 974 } |
| OLD | NEW |