| 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 152 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 163 if (url.host() == chrome::kChromeUITaskManagerHost) | 163 if (url.host() == chrome::kChromeUITaskManagerHost) |
| 164 return &NewWebUI<TaskManagerUI>; | 164 return &NewWebUI<TaskManagerUI>; |
| 165 if (url.host() == chrome::kChromeUITextfieldsHost) | 165 if (url.host() == chrome::kChromeUITextfieldsHost) |
| 166 return &NewWebUI<TextfieldsUI>; | 166 return &NewWebUI<TextfieldsUI>; |
| 167 if (url.host() == chrome::kChromeUIExtensionsHost) | 167 if (url.host() == chrome::kChromeUIExtensionsHost) |
| 168 return &NewWebUI<ExtensionsUI>; | 168 return &NewWebUI<ExtensionsUI>; |
| 169 if (url.host() == chrome::kChromeUIHistoryHost) | 169 if (url.host() == chrome::kChromeUIHistoryHost) |
| 170 return &NewWebUI<HistoryUI>; | 170 return &NewWebUI<HistoryUI>; |
| 171 if (url.host() == chrome::kChromeUIHistory2Host) | 171 if (url.host() == chrome::kChromeUIHistory2Host) |
| 172 return &NewWebUI<HistoryUI2>; | 172 return &NewWebUI<HistoryUI2>; |
| 173 if (url.host() == chrome::kChromeUIFlagsHost) | 173 // TODO(thakis): Reenable. |
| 174 return &NewWebUI<FlagsUI>; | 174 //if (url.host() == chrome::kChromeUIFlagsHost) |
| 175 // return &NewWebUI<FlagsUI>; |
| 175 if (url.host() == chrome::kChromeUIFlashHost) | 176 if (url.host() == chrome::kChromeUIFlashHost) |
| 176 return &NewWebUI<FlashUI>; | 177 return &NewWebUI<FlashUI>; |
| 177 #if defined(TOUCH_UI) | 178 #if defined(TOUCH_UI) |
| 178 if (url.host() == chrome::kChromeUIKeyboardHost) | 179 if (url.host() == chrome::kChromeUIKeyboardHost) |
| 179 return &NewWebUI<KeyboardUI>; | 180 return &NewWebUI<KeyboardUI>; |
| 180 #endif | 181 #endif |
| 181 if (url.host() == chrome::kChromeUIGpuInternalsHost) | 182 if (url.host() == chrome::kChromeUIGpuInternalsHost) |
| 182 return &NewWebUI<GpuInternalsUI>; | 183 return &NewWebUI<GpuInternalsUI>; |
| 183 if (url.host() == chrome::kChromeUIMediaInternalsHost) | 184 if (url.host() == chrome::kChromeUIMediaInternalsHost) |
| 184 return &NewWebUI<MediaInternalsUI>; | 185 return &NewWebUI<MediaInternalsUI>; |
| (...skipping 184 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 369 | 370 |
| 370 if (page_url.host() == chrome::kChromeUIExtensionsHost) | 371 if (page_url.host() == chrome::kChromeUIExtensionsHost) |
| 371 return ExtensionsUI::GetFaviconResourceBytes(); | 372 return ExtensionsUI::GetFaviconResourceBytes(); |
| 372 | 373 |
| 373 if (page_url.host() == chrome::kChromeUIHistoryHost) | 374 if (page_url.host() == chrome::kChromeUIHistoryHost) |
| 374 return HistoryUI::GetFaviconResourceBytes(); | 375 return HistoryUI::GetFaviconResourceBytes(); |
| 375 | 376 |
| 376 if (page_url.host() == chrome::kChromeUIHistory2Host) | 377 if (page_url.host() == chrome::kChromeUIHistory2Host) |
| 377 return HistoryUI2::GetFaviconResourceBytes(); | 378 return HistoryUI2::GetFaviconResourceBytes(); |
| 378 | 379 |
| 379 if (page_url.host() == chrome::kChromeUIFlagsHost) | 380 // TODO(thakis): Reenable. |
| 380 return FlagsUI::GetFaviconResourceBytes(); | 381 //if (page_url.host() == chrome::kChromeUIFlagsHost) |
| 382 // return FlagsUI::GetFaviconResourceBytes(); |
| 381 | 383 |
| 382 if (page_url.host() == chrome::kChromeUISessionsHost) | 384 if (page_url.host() == chrome::kChromeUISessionsHost) |
| 383 return SessionsUI::GetFaviconResourceBytes(); | 385 return SessionsUI::GetFaviconResourceBytes(); |
| 384 | 386 |
| 385 if (page_url.host() == chrome::kChromeUIFlashHost) | 387 if (page_url.host() == chrome::kChromeUIFlashHost) |
| 386 return FlashUI::GetFaviconResourceBytes(); | 388 return FlashUI::GetFaviconResourceBytes(); |
| 387 | 389 |
| 388 if (page_url.host() == chrome::kChromeUISettingsHost) | 390 if (page_url.host() == chrome::kChromeUISettingsHost) |
| 389 return OptionsUI::GetFaviconResourceBytes(); | 391 return OptionsUI::GetFaviconResourceBytes(); |
| 390 | 392 |
| 391 if (page_url.host() == chrome::kChromeUIPluginsHost) | 393 if (page_url.host() == chrome::kChromeUIPluginsHost) |
| 392 return PluginsUI::GetFaviconResourceBytes(); | 394 return PluginsUI::GetFaviconResourceBytes(); |
| 393 | 395 |
| 394 return NULL; | 396 return NULL; |
| 395 } | 397 } |
| OLD | NEW |