Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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/ui/webui/chrome_web_ui_factory.h" | 5 #include "chrome/browser/ui/webui/chrome_web_ui_factory.h" |
| 6 | 6 |
| 7 #include "base/command_line.h" | 7 #include "base/command_line.h" |
| 8 #include "chrome/browser/about_flags.h" | 8 #include "chrome/browser/about_flags.h" |
| 9 #include "chrome/browser/extensions/extension_service.h" | 9 #include "chrome/browser/extensions/extension_service.h" |
| 10 #include "chrome/browser/extensions/extension_web_ui.h" | 10 #include "chrome/browser/extensions/extension_web_ui.h" |
| (...skipping 184 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 195 return &NewWebUI<chromeos::ProxySettingsUI>; | 195 return &NewWebUI<chromeos::ProxySettingsUI>; |
| 196 if (url.host() == chrome::kChromeUIRegisterPageHost) | 196 if (url.host() == chrome::kChromeUIRegisterPageHost) |
| 197 return &NewWebUI<RegisterPageUI>; | 197 return &NewWebUI<RegisterPageUI>; |
| 198 if (url.host() == chrome::kChromeUISimUnlockHost) | 198 if (url.host() == chrome::kChromeUISimUnlockHost) |
| 199 return &NewWebUI<chromeos::SimUnlockUI>; | 199 return &NewWebUI<chromeos::SimUnlockUI>; |
| 200 if (url.host() == chrome::kChromeUISystemInfoHost) | 200 if (url.host() == chrome::kChromeUISystemInfoHost) |
| 201 return &NewWebUI<SystemInfoUI>; | 201 return &NewWebUI<SystemInfoUI>; |
| 202 if (url.host() == chrome::kChromeUIEnterpriseEnrollmentHost) | 202 if (url.host() == chrome::kChromeUIEnterpriseEnrollmentHost) |
| 203 return &NewWebUI<chromeos::EnterpriseEnrollmentUI>; | 203 return &NewWebUI<chromeos::EnterpriseEnrollmentUI>; |
| 204 #else | 204 #else |
| 205 if (url.host() == chrome::kChromeUISettingsHost) | |
|
Lei Zhang
2011/06/09 21:23:30
isn't this already on line 172?
Albert Bodenhamer
2011/06/10 01:29:36
Good catch. I think something went wrong with a m
| |
| 206 return &NewWebUI<OptionsUI>; | |
| 207 #endif // defined(OS_CHROMEOS) | |
| 208 | |
| 205 if (url.host() == chrome::kChromeUIPrintHost && | 209 if (url.host() == chrome::kChromeUIPrintHost && |
| 206 switches::IsPrintPreviewEnabled()) { | 210 switches::IsPrintPreviewEnabled()) { |
| 207 return &NewWebUI<PrintPreviewUI>; | 211 return &NewWebUI<PrintPreviewUI>; |
| 208 } | 212 } |
| 209 #endif // defined(OS_CHROMEOS) | |
| 210 | 213 |
| 211 if (url.spec() == chrome::kChromeUIConstrainedHTMLTestURL) | 214 if (url.spec() == chrome::kChromeUIConstrainedHTMLTestURL) |
| 212 return &NewWebUI<ConstrainedHtmlUI>; | 215 return &NewWebUI<ConstrainedHtmlUI>; |
| 213 | 216 |
| 214 return NULL; | 217 return NULL; |
| 215 } | 218 } |
| 216 | 219 |
| 217 // When the test-type switch is set, return a TestType object, which should be a | 220 // When the test-type switch is set, return a TestType object, which should be a |
| 218 // subclass of Type. The logic is provided here in the traits class, rather than | 221 // subclass of Type. The logic is provided here in the traits class, rather than |
| 219 // in GetInstance() so that the choice is made only once, when the Singleton is | 222 // in GetInstance() so that the choice is made only once, when the Singleton is |
| (...skipping 133 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 353 return FlashUI::GetFaviconResourceBytes(); | 356 return FlashUI::GetFaviconResourceBytes(); |
| 354 | 357 |
| 355 if (page_url.host() == chrome::kChromeUISettingsHost) | 358 if (page_url.host() == chrome::kChromeUISettingsHost) |
| 356 return OptionsUI::GetFaviconResourceBytes(); | 359 return OptionsUI::GetFaviconResourceBytes(); |
| 357 | 360 |
| 358 if (page_url.host() == chrome::kChromeUIPluginsHost) | 361 if (page_url.host() == chrome::kChromeUIPluginsHost) |
| 359 return PluginsUI::GetFaviconResourceBytes(); | 362 return PluginsUI::GetFaviconResourceBytes(); |
| 360 | 363 |
| 361 return NULL; | 364 return NULL; |
| 362 } | 365 } |
| OLD | NEW |