| 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 162 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 173 if (url.host() == chrome::kChromeUITaskManagerHost) | 173 if (url.host() == chrome::kChromeUITaskManagerHost) |
| 174 return &NewWebUI<TaskManagerUI>; | 174 return &NewWebUI<TaskManagerUI>; |
| 175 if (url.host() == chrome::kChromeUITextfieldsHost) | 175 if (url.host() == chrome::kChromeUITextfieldsHost) |
| 176 return &NewWebUI<TextfieldsUI>; | 176 return &NewWebUI<TextfieldsUI>; |
| 177 if (url.host() == chrome::kChromeUIExtensionsHost) | 177 if (url.host() == chrome::kChromeUIExtensionsHost) |
| 178 return &NewWebUI<ExtensionsUI>; | 178 return &NewWebUI<ExtensionsUI>; |
| 179 if (url.host() == chrome::kChromeUIHistoryHost) | 179 if (url.host() == chrome::kChromeUIHistoryHost) |
| 180 return &NewWebUI<HistoryUI>; | 180 return &NewWebUI<HistoryUI>; |
| 181 if (url.host() == chrome::kChromeUIHistory2Host) | 181 if (url.host() == chrome::kChromeUIHistory2Host) |
| 182 return &NewWebUI<HistoryUI2>; | 182 return &NewWebUI<HistoryUI2>; |
| 183 if (url.host() == chrome::kChromeUIFlagsHost) | 183 // TODO(thakis): Reenable. |
| 184 return &NewWebUI<FlagsUI>; | 184 //if (url.host() == chrome::kChromeUIFlagsHost) |
| 185 // return &NewWebUI<FlagsUI>; |
| 185 if (url.host() == chrome::kChromeUIFlashHost) | 186 if (url.host() == chrome::kChromeUIFlashHost) |
| 186 return &NewWebUI<FlashUI>; | 187 return &NewWebUI<FlashUI>; |
| 187 #if defined(TOUCH_UI) | 188 #if defined(TOUCH_UI) |
| 188 if (url.host() == chrome::kChromeUIKeyboardHost) | 189 if (url.host() == chrome::kChromeUIKeyboardHost) |
| 189 return &NewWebUI<KeyboardUI>; | 190 return &NewWebUI<KeyboardUI>; |
| 190 #endif | 191 #endif |
| 191 if (url.host() == chrome::kChromeUIGpuInternalsHost) | 192 if (url.host() == chrome::kChromeUIGpuInternalsHost) |
| 192 return &NewWebUI<GpuInternalsUI>; | 193 return &NewWebUI<GpuInternalsUI>; |
| 193 if (url.host() == chrome::kChromeUIMediaInternalsHost) | 194 if (url.host() == chrome::kChromeUIMediaInternalsHost) |
| 194 return &NewWebUI<MediaInternalsUI>; | 195 return &NewWebUI<MediaInternalsUI>; |
| (...skipping 183 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 378 | 379 |
| 379 if (page_url.host() == chrome::kChromeUIExtensionsHost) | 380 if (page_url.host() == chrome::kChromeUIExtensionsHost) |
| 380 return ExtensionsUI::GetFaviconResourceBytes(); | 381 return ExtensionsUI::GetFaviconResourceBytes(); |
| 381 | 382 |
| 382 if (page_url.host() == chrome::kChromeUIHistoryHost) | 383 if (page_url.host() == chrome::kChromeUIHistoryHost) |
| 383 return HistoryUI::GetFaviconResourceBytes(); | 384 return HistoryUI::GetFaviconResourceBytes(); |
| 384 | 385 |
| 385 if (page_url.host() == chrome::kChromeUIHistory2Host) | 386 if (page_url.host() == chrome::kChromeUIHistory2Host) |
| 386 return HistoryUI2::GetFaviconResourceBytes(); | 387 return HistoryUI2::GetFaviconResourceBytes(); |
| 387 | 388 |
| 388 if (page_url.host() == chrome::kChromeUIFlagsHost) | 389 // TODO(thakis): Reenable. |
| 389 return FlagsUI::GetFaviconResourceBytes(); | 390 //if (page_url.host() == chrome::kChromeUIFlagsHost) |
| 391 // return FlagsUI::GetFaviconResourceBytes(); |
| 390 | 392 |
| 391 if (page_url.host() == chrome::kChromeUISessionsHost) | 393 if (page_url.host() == chrome::kChromeUISessionsHost) |
| 392 return SessionsUI::GetFaviconResourceBytes(); | 394 return SessionsUI::GetFaviconResourceBytes(); |
| 393 | 395 |
| 394 if (page_url.host() == chrome::kChromeUIFlashHost) | 396 if (page_url.host() == chrome::kChromeUIFlashHost) |
| 395 return FlashUI::GetFaviconResourceBytes(); | 397 return FlashUI::GetFaviconResourceBytes(); |
| 396 | 398 |
| 397 if (page_url.host() == chrome::kChromeUISettingsHost) | 399 if (page_url.host() == chrome::kChromeUISettingsHost) |
| 398 return OptionsUI::GetFaviconResourceBytes(); | 400 return OptionsUI::GetFaviconResourceBytes(); |
| 399 | 401 |
| 400 if (page_url.host() == chrome::kChromeUIPluginsHost) | 402 if (page_url.host() == chrome::kChromeUIPluginsHost) |
| 401 return PluginsUI::GetFaviconResourceBytes(); | 403 return PluginsUI::GetFaviconResourceBytes(); |
| 402 | 404 |
| 403 return NULL; | 405 return NULL; |
| 404 } | 406 } |
| OLD | NEW |