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/dom_ui/flags_ui.h" | 5 #include "chrome/browser/dom_ui/flags_ui.h" |
6 | 6 |
7 #include <string> | 7 #include <string> |
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 165 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
176 /////////////////////////////////////////////////////////////////////////////// | 176 /////////////////////////////////////////////////////////////////////////////// |
177 | 177 |
178 FlagsUI::FlagsUI(TabContents* contents) : DOMUI(contents) { | 178 FlagsUI::FlagsUI(TabContents* contents) : DOMUI(contents) { |
179 AddMessageHandler((new FlagsDOMHandler())->Attach(this)); | 179 AddMessageHandler((new FlagsDOMHandler())->Attach(this)); |
180 | 180 |
181 FlagsUIHTMLSource* html_source = new FlagsUIHTMLSource(); | 181 FlagsUIHTMLSource* html_source = new FlagsUIHTMLSource(); |
182 | 182 |
183 // Set up the about:flags source. | 183 // Set up the about:flags source. |
184 BrowserThread::PostTask( | 184 BrowserThread::PostTask( |
185 BrowserThread::IO, FROM_HERE, | 185 BrowserThread::IO, FROM_HERE, |
186 NewRunnableMethod(Singleton<ChromeURLDataManager>::get(), | 186 NewRunnableMethod(ChromeURLDataManager::GetInstance(), |
187 &ChromeURLDataManager::AddDataSource, | 187 &ChromeURLDataManager::AddDataSource, |
188 make_scoped_refptr(html_source))); | 188 make_scoped_refptr(html_source))); |
189 } | 189 } |
190 | 190 |
191 // static | 191 // static |
192 RefCountedMemory* FlagsUI::GetFaviconResourceBytes() { | 192 RefCountedMemory* FlagsUI::GetFaviconResourceBytes() { |
193 return ResourceBundle::GetSharedInstance(). | 193 return ResourceBundle::GetSharedInstance(). |
194 LoadDataResourceBytes(IDR_FLAGS); | 194 LoadDataResourceBytes(IDR_FLAGS); |
195 } | 195 } |
196 | 196 |
197 // static | 197 // static |
198 void FlagsUI::RegisterUserPrefs(PrefService* prefs) { | 198 void FlagsUI::RegisterUserPrefs(PrefService* prefs) { |
199 prefs->RegisterListPref(prefs::kEnabledLabsExperiments); | 199 prefs->RegisterListPref(prefs::kEnabledLabsExperiments); |
200 } | 200 } |
OLD | NEW |