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 200 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
211 if (url.host() == chrome::kChromeUIProxySettingsHost) | 211 if (url.host() == chrome::kChromeUIProxySettingsHost) |
212 return &NewWebUI<chromeos::ProxySettingsUI>; | 212 return &NewWebUI<chromeos::ProxySettingsUI>; |
213 if (url.host() == chrome::kChromeUIRegisterPageHost) | 213 if (url.host() == chrome::kChromeUIRegisterPageHost) |
214 return &NewWebUI<RegisterPageUI>; | 214 return &NewWebUI<RegisterPageUI>; |
215 if (url.host() == chrome::kChromeUISimUnlockHost) | 215 if (url.host() == chrome::kChromeUISimUnlockHost) |
216 return &NewWebUI<chromeos::SimUnlockUI>; | 216 return &NewWebUI<chromeos::SimUnlockUI>; |
217 if (url.host() == chrome::kChromeUISystemInfoHost) | 217 if (url.host() == chrome::kChromeUISystemInfoHost) |
218 return &NewWebUI<SystemInfoUI>; | 218 return &NewWebUI<SystemInfoUI>; |
219 if (url.host() == chrome::kChromeUIEnterpriseEnrollmentHost) | 219 if (url.host() == chrome::kChromeUIEnterpriseEnrollmentHost) |
220 return &NewWebUI<chromeos::EnterpriseEnrollmentUI>; | 220 return &NewWebUI<chromeos::EnterpriseEnrollmentUI>; |
221 #else | 221 #endif // defined(OS_CHROMEOS) |
| 222 |
222 if (url.host() == chrome::kChromeUIPrintHost && | 223 if (url.host() == chrome::kChromeUIPrintHost && |
223 switches::IsPrintPreviewEnabled()) { | 224 switches::IsPrintPreviewEnabled()) { |
224 return &NewWebUI<PrintPreviewUI>; | 225 return &NewWebUI<PrintPreviewUI>; |
225 } | 226 } |
226 #endif // defined(OS_CHROMEOS) | |
227 | 227 |
228 if (url.spec() == chrome::kChromeUIConstrainedHTMLTestURL) | 228 if (url.spec() == chrome::kChromeUIConstrainedHTMLTestURL) |
229 return &NewWebUI<ConstrainedHtmlUI>; | 229 return &NewWebUI<ConstrainedHtmlUI>; |
230 | 230 |
231 #if !defined(OS_CHROMEOS) | 231 #if !defined(OS_CHROMEOS) |
232 if (ProfileManager::IsMultipleProfilesEnabled()) { | 232 if (ProfileManager::IsMultipleProfilesEnabled()) { |
233 if (url.host() == chrome::kChromeUINewProfileHost) | 233 if (url.host() == chrome::kChromeUINewProfileHost) |
234 return &NewWebUI<NewProfileUI>; | 234 return &NewWebUI<NewProfileUI>; |
235 } | 235 } |
236 #endif | 236 #endif |
(...skipping 141 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
378 return FlashUI::GetFaviconResourceBytes(); | 378 return FlashUI::GetFaviconResourceBytes(); |
379 | 379 |
380 if (page_url.host() == chrome::kChromeUISettingsHost) | 380 if (page_url.host() == chrome::kChromeUISettingsHost) |
381 return OptionsUI::GetFaviconResourceBytes(); | 381 return OptionsUI::GetFaviconResourceBytes(); |
382 | 382 |
383 if (page_url.host() == chrome::kChromeUIPluginsHost) | 383 if (page_url.host() == chrome::kChromeUIPluginsHost) |
384 return PluginsUI::GetFaviconResourceBytes(); | 384 return PluginsUI::GetFaviconResourceBytes(); |
385 | 385 |
386 return NULL; | 386 return NULL; |
387 } | 387 } |
OLD | NEW |