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