Chromium Code Reviews| 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" |
| 11 #include "chrome/browser/history/history_types.h" | 11 #include "chrome/browser/history/history_types.h" |
| 12 #include "chrome/browser/profiles/profile.h" | 12 #include "chrome/browser/profiles/profile.h" |
| 13 #include "chrome/browser/profiles/profile_manager.h" | 13 #include "chrome/browser/profiles/profile_manager.h" |
| 14 #include "chrome/browser/ui/tab_contents/tab_contents_wrapper.h" | 14 #include "chrome/browser/ui/tab_contents/tab_contents_wrapper.h" |
| 15 #include "chrome/browser/ui/webui/about_ui.h" | 15 #include "chrome/browser/ui/webui/about_ui.h" |
| 16 #include "chrome/browser/ui/webui/bookmarks_ui.h" | 16 #include "chrome/browser/ui/webui/bookmarks_ui.h" |
| 17 #include "chrome/browser/ui/webui/bug_report_ui.h" | 17 #include "chrome/browser/ui/webui/feedback_ui.h" |
|
xiyuan
2011/12/22 02:18:23
sort alphabetically.
rkc
2011/12/22 22:41:46
Done.
| |
| 18 #include "chrome/browser/ui/webui/constrained_html_ui.h" | 18 #include "chrome/browser/ui/webui/constrained_html_ui.h" |
| 19 #include "chrome/browser/ui/webui/crashes_ui.h" | 19 #include "chrome/browser/ui/webui/crashes_ui.h" |
| 20 #include "chrome/browser/ui/webui/devtools_ui.h" | 20 #include "chrome/browser/ui/webui/devtools_ui.h" |
| 21 #include "chrome/browser/ui/webui/downloads_ui.h" | 21 #include "chrome/browser/ui/webui/downloads_ui.h" |
| 22 #include "chrome/browser/ui/webui/edit_search_engine_dialog_ui_webui.h" | 22 #include "chrome/browser/ui/webui/edit_search_engine_dialog_ui_webui.h" |
| 23 #include "chrome/browser/ui/webui/extensions/extensions_ui.h" | 23 #include "chrome/browser/ui/webui/extensions/extensions_ui.h" |
| 24 #include "chrome/browser/ui/webui/task_manager_ui.h" | 24 #include "chrome/browser/ui/webui/task_manager_ui.h" |
| 25 #include "chrome/browser/ui/webui/flags_ui.h" | 25 #include "chrome/browser/ui/webui/flags_ui.h" |
| 26 #include "chrome/browser/ui/webui/flash_ui.h" | 26 #include "chrome/browser/ui/webui/flash_ui.h" |
| 27 #include "chrome/browser/ui/webui/gpu_internals_ui.h" | 27 #include "chrome/browser/ui/webui/gpu_internals_ui.h" |
| (...skipping 131 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 159 // tab page. | 159 // tab page. |
| 160 if (url.host() == chrome::kChromeUINewTabHost || | 160 if (url.host() == chrome::kChromeUINewTabHost || |
| 161 url.SchemeIs(chrome::kChromeInternalScheme)) { | 161 url.SchemeIs(chrome::kChromeInternalScheme)) { |
| 162 return &NewWebUI<NewTabUI>; | 162 return &NewWebUI<NewTabUI>; |
| 163 } | 163 } |
| 164 | 164 |
| 165 // We must compare hosts only since some of the Web UIs append extra stuff | 165 // We must compare hosts only since some of the Web UIs append extra stuff |
| 166 // after the host name. | 166 // after the host name. |
| 167 if (url.host() == chrome::kChromeUIBookmarksHost) | 167 if (url.host() == chrome::kChromeUIBookmarksHost) |
| 168 return &NewWebUI<BookmarksUI>; | 168 return &NewWebUI<BookmarksUI>; |
| 169 if (url.host() == chrome::kChromeUIBugReportHost) | 169 if (url.host() == chrome::kChromeUIFeedbackHost) |
|
rkc
2011/12/22 22:41:46
Sorted this alphabetically also.
| |
| 170 return &NewWebUI<BugReportUI>; | 170 return &NewWebUI<FeedbackUI>; |
| 171 #if defined(OS_POSIX) && !defined(OS_MACOSX) | 171 #if defined(OS_POSIX) && !defined(OS_MACOSX) |
| 172 if (url.host() == chrome::kChromeUICertificateViewerHost) | 172 if (url.host() == chrome::kChromeUICertificateViewerHost) |
| 173 return &NewWebUI<CertificateViewerUI>; | 173 return &NewWebUI<CertificateViewerUI>; |
| 174 #endif | 174 #endif |
| 175 #if defined(OS_WIN) | 175 #if defined(OS_WIN) |
| 176 if (url.host() == chrome::kChromeUIConflictsHost) | 176 if (url.host() == chrome::kChromeUIConflictsHost) |
| 177 return &NewWebUI<ConflictsUI>; | 177 return &NewWebUI<ConflictsUI>; |
| 178 #endif | 178 #endif |
| 179 if (url.host() == chrome::kChromeUICrashesHost) | 179 if (url.host() == chrome::kChromeUICrashesHost) |
| 180 return &NewWebUI<CrashesUI>; | 180 return &NewWebUI<CrashesUI>; |
| (...skipping 289 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 470 return OptionsUI::GetFaviconResourceBytes(); | 470 return OptionsUI::GetFaviconResourceBytes(); |
| 471 | 471 |
| 472 if (page_url.host() == chrome::kChromeUISettingsFrameHost) | 472 if (page_url.host() == chrome::kChromeUISettingsFrameHost) |
| 473 return Options2UI::GetFaviconResourceBytes(); | 473 return Options2UI::GetFaviconResourceBytes(); |
| 474 | 474 |
| 475 if (page_url.host() == chrome::kChromeUIPluginsHost) | 475 if (page_url.host() == chrome::kChromeUIPluginsHost) |
| 476 return PluginsUI::GetFaviconResourceBytes(); | 476 return PluginsUI::GetFaviconResourceBytes(); |
| 477 | 477 |
| 478 return NULL; | 478 return NULL; |
| 479 } | 479 } |
| OLD | NEW |