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 182 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
193 return &NewWebUI<OptionsUI>; | 193 return &NewWebUI<OptionsUI>; |
194 if (url.host() == chrome::kChromeUISimUnlockHost) | 194 if (url.host() == chrome::kChromeUISimUnlockHost) |
195 return &NewWebUI<chromeos::SimUnlockUI>; | 195 return &NewWebUI<chromeos::SimUnlockUI>; |
196 if (url.host() == chrome::kChromeUISystemInfoHost) | 196 if (url.host() == chrome::kChromeUISystemInfoHost) |
197 return &NewWebUI<SystemInfoUI>; | 197 return &NewWebUI<SystemInfoUI>; |
198 if (url.host() == chrome::kChromeUIEnterpriseEnrollmentHost) | 198 if (url.host() == chrome::kChromeUIEnterpriseEnrollmentHost) |
199 return &NewWebUI<chromeos::EnterpriseEnrollmentUI>; | 199 return &NewWebUI<chromeos::EnterpriseEnrollmentUI>; |
200 #else | 200 #else |
201 if (url.host() == chrome::kChromeUISettingsHost) | 201 if (url.host() == chrome::kChromeUISettingsHost) |
202 return &NewWebUI<OptionsUI>; | 202 return &NewWebUI<OptionsUI>; |
| 203 #endif // defined(OS_CHROMEOS) |
| 204 |
203 if (url.host() == chrome::kChromeUIPrintHost && | 205 if (url.host() == chrome::kChromeUIPrintHost && |
204 switches::IsPrintPreviewEnabled()) { | 206 switches::IsPrintPreviewEnabled()) { |
205 return &NewWebUI<PrintPreviewUI>; | 207 return &NewWebUI<PrintPreviewUI>; |
206 } | 208 } |
207 #endif // defined(OS_CHROMEOS) | |
208 | 209 |
209 #if defined(TOUCH_UI) && defined(OS_CHROMEOS) | 210 #if defined(TOUCH_UI) && defined(OS_CHROMEOS) |
210 if (url.host() == chrome::kChromeUILoginHost) | 211 if (url.host() == chrome::kChromeUILoginHost) |
211 return &NewWebUI<chromeos::LoginUI>; | 212 return &NewWebUI<chromeos::LoginUI>; |
212 #endif | 213 #endif |
213 | 214 |
214 if (url.spec() == chrome::kChromeUIConstrainedHTMLTestURL) | 215 if (url.spec() == chrome::kChromeUIConstrainedHTMLTestURL) |
215 return &NewWebUI<ConstrainedHtmlUI>; | 216 return &NewWebUI<ConstrainedHtmlUI>; |
216 | 217 |
217 return NULL; | 218 return NULL; |
(...skipping 117 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
335 return FlagsUI::GetFaviconResourceBytes(); | 336 return FlagsUI::GetFaviconResourceBytes(); |
336 | 337 |
337 if (page_url.host() == chrome::kChromeUISettingsHost) | 338 if (page_url.host() == chrome::kChromeUISettingsHost) |
338 return OptionsUI::GetFaviconResourceBytes(); | 339 return OptionsUI::GetFaviconResourceBytes(); |
339 | 340 |
340 if (page_url.host() == chrome::kChromeUIPluginsHost) | 341 if (page_url.host() == chrome::kChromeUIPluginsHost) |
341 return PluginsUI::GetFaviconResourceBytes(); | 342 return PluginsUI::GetFaviconResourceBytes(); |
342 | 343 |
343 return NULL; | 344 return NULL; |
344 } | 345 } |
OLD | NEW |