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 185 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
196 if (url.host() == chrome::kChromeUIProxySettingsHost) | 196 if (url.host() == chrome::kChromeUIProxySettingsHost) |
197 return &NewWebUI<chromeos::ProxySettingsUI>; | 197 return &NewWebUI<chromeos::ProxySettingsUI>; |
198 if (url.host() == chrome::kChromeUIRegisterPageHost) | 198 if (url.host() == chrome::kChromeUIRegisterPageHost) |
199 return &NewWebUI<RegisterPageUI>; | 199 return &NewWebUI<RegisterPageUI>; |
200 if (url.host() == chrome::kChromeUISimUnlockHost) | 200 if (url.host() == chrome::kChromeUISimUnlockHost) |
201 return &NewWebUI<chromeos::SimUnlockUI>; | 201 return &NewWebUI<chromeos::SimUnlockUI>; |
202 if (url.host() == chrome::kChromeUISystemInfoHost) | 202 if (url.host() == chrome::kChromeUISystemInfoHost) |
203 return &NewWebUI<SystemInfoUI>; | 203 return &NewWebUI<SystemInfoUI>; |
204 if (url.host() == chrome::kChromeUIEnterpriseEnrollmentHost) | 204 if (url.host() == chrome::kChromeUIEnterpriseEnrollmentHost) |
205 return &NewWebUI<chromeos::EnterpriseEnrollmentUI>; | 205 return &NewWebUI<chromeos::EnterpriseEnrollmentUI>; |
206 #else | 206 #endif // defined(OS_CHROMEOS) |
| 207 |
207 if (url.host() == chrome::kChromeUIPrintHost && | 208 if (url.host() == chrome::kChromeUIPrintHost && |
208 switches::IsPrintPreviewEnabled()) { | 209 switches::IsPrintPreviewEnabled()) { |
209 return &NewWebUI<PrintPreviewUI>; | 210 return &NewWebUI<PrintPreviewUI>; |
210 } | 211 } |
211 #endif // defined(OS_CHROMEOS) | |
212 | 212 |
213 if (url.spec() == chrome::kChromeUIConstrainedHTMLTestURL) | 213 if (url.spec() == chrome::kChromeUIConstrainedHTMLTestURL) |
214 return &NewWebUI<ConstrainedHtmlUI>; | 214 return &NewWebUI<ConstrainedHtmlUI>; |
215 | 215 |
216 return NULL; | 216 return NULL; |
217 } | 217 } |
218 | 218 |
219 // When the test-type switch is set, return a TestType object, which should be a | 219 // When the test-type switch is set, return a TestType object, which should be a |
220 // subclass of Type. The logic is provided here in the traits class, rather than | 220 // subclass of Type. The logic is provided here in the traits class, rather than |
221 // in GetInstance() so that the choice is made only once, when the Singleton is | 221 // in GetInstance() so that the choice is made only once, when the Singleton is |
(...skipping 134 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
356 return FlashUI::GetFaviconResourceBytes(); | 356 return FlashUI::GetFaviconResourceBytes(); |
357 | 357 |
358 if (page_url.host() == chrome::kChromeUISettingsHost) | 358 if (page_url.host() == chrome::kChromeUISettingsHost) |
359 return OptionsUI::GetFaviconResourceBytes(); | 359 return OptionsUI::GetFaviconResourceBytes(); |
360 | 360 |
361 if (page_url.host() == chrome::kChromeUIPluginsHost) | 361 if (page_url.host() == chrome::kChromeUIPluginsHost) |
362 return PluginsUI::GetFaviconResourceBytes(); | 362 return PluginsUI::GetFaviconResourceBytes(); |
363 | 363 |
364 return NULL; | 364 return NULL; |
365 } | 365 } |
OLD | NEW |