Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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_controller_factory.h" | 5 #include "chrome/browser/ui/webui/chrome_web_ui_controller_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 30 matching lines...) Expand all Loading... | |
| 41 #include "chrome/browser/ui/webui/predictors/predictors_ui.h" | 41 #include "chrome/browser/ui/webui/predictors/predictors_ui.h" |
| 42 #include "chrome/browser/ui/webui/print_preview/print_preview_ui.h" | 42 #include "chrome/browser/ui/webui/print_preview/print_preview_ui.h" |
| 43 #include "chrome/browser/ui/webui/profiler_ui.h" | 43 #include "chrome/browser/ui/webui/profiler_ui.h" |
| 44 #include "chrome/browser/ui/webui/quota_internals_ui.h" | 44 #include "chrome/browser/ui/webui/quota_internals_ui.h" |
| 45 #include "chrome/browser/ui/webui/suggestions_internals/suggestions_internals_ui .h" | 45 #include "chrome/browser/ui/webui/suggestions_internals/suggestions_internals_ui .h" |
| 46 #include "chrome/browser/ui/webui/sync_internals_ui.h" | 46 #include "chrome/browser/ui/webui/sync_internals_ui.h" |
| 47 #include "chrome/browser/ui/webui/task_manager/task_manager_ui.h" | 47 #include "chrome/browser/ui/webui/task_manager/task_manager_ui.h" |
| 48 #include "chrome/browser/ui/webui/test_chrome_web_ui_controller_factory.h" | 48 #include "chrome/browser/ui/webui/test_chrome_web_ui_controller_factory.h" |
| 49 #include "chrome/browser/ui/webui/tracing_ui.h" | 49 #include "chrome/browser/ui/webui/tracing_ui.h" |
| 50 #include "chrome/browser/ui/webui/uber/uber_ui.h" | 50 #include "chrome/browser/ui/webui/uber/uber_ui.h" |
| 51 #include "chrome/browser/ui/webui/welcome_ui_android.h" | |
|
Evan Stade
2012/08/10 02:40:01
inside ifdef please.
newt (away)
2012/08/10 20:49:43
Done.
| |
| 51 #include "chrome/common/chrome_switches.h" | 52 #include "chrome/common/chrome_switches.h" |
| 52 #include "chrome/common/extensions/extension_constants.h" | 53 #include "chrome/common/extensions/extension_constants.h" |
| 53 #include "chrome/common/extensions/extension_switch_utils.h" | 54 #include "chrome/common/extensions/extension_switch_utils.h" |
| 54 #include "chrome/common/pref_names.h" | 55 #include "chrome/common/pref_names.h" |
| 55 #include "chrome/common/url_constants.h" | 56 #include "chrome/common/url_constants.h" |
| 56 #include "content/public/browser/web_contents.h" | 57 #include "content/public/browser/web_contents.h" |
| 57 #include "content/public/browser/web_ui.h" | 58 #include "content/public/browser/web_ui.h" |
| 58 #include "content/public/common/content_client.h" | 59 #include "content/public/common/content_client.h" |
| 59 #include "googleurl/src/gurl.h" | 60 #include "googleurl/src/gurl.h" |
| 60 #include "ui/web_dialogs/constrained_web_dialog_ui.h" | 61 #include "ui/web_dialogs/constrained_web_dialog_ui.h" |
| (...skipping 158 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 219 if (url.host() == chrome::kChromeUITracingHost) | 220 if (url.host() == chrome::kChromeUITracingHost) |
| 220 return &NewWebUI<TracingUI>; | 221 return &NewWebUI<TracingUI>; |
| 221 if (url.host() == chrome::kChromeUIUberFrameHost) | 222 if (url.host() == chrome::kChromeUIUberFrameHost) |
| 222 return &NewWebUI<UberFrameUI>; | 223 return &NewWebUI<UberFrameUI>; |
| 223 if (url.host() == chrome::kChromeUIUberHost) | 224 if (url.host() == chrome::kChromeUIUberHost) |
| 224 return &NewWebUI<UberUI>; | 225 return &NewWebUI<UberUI>; |
| 225 | 226 |
| 226 /**************************************************************************** | 227 /**************************************************************************** |
| 227 * OS Specific #defines | 228 * OS Specific #defines |
| 228 ***************************************************************************/ | 229 ***************************************************************************/ |
| 230 #if defined(OS_ANDROID) | |
| 231 if (url.host() == chrome::kChromeUIWelcomeHost) | |
| 232 return &NewWebUI<WelcomeUI>; | |
| 233 #endif | |
|
Evan Stade
2012/08/10 02:40:01
you can use #else
newt (away)
2012/08/10 20:49:43
Done.
| |
| 229 #if !defined(OS_ANDROID) | 234 #if !defined(OS_ANDROID) |
| 230 // These pages are implemented with native UI elements on Android. | 235 // These pages are implemented with native UI elements on Android. |
| 231 if (url.host() == chrome::kChromeUIDownloadsHost) | 236 if (url.host() == chrome::kChromeUIDownloadsHost) |
| 232 return &NewWebUI<DownloadsUI>; | 237 return &NewWebUI<DownloadsUI>; |
| 233 if (url.host() == chrome::kChromeUIFeedbackHost) | 238 if (url.host() == chrome::kChromeUIFeedbackHost) |
| 234 return &NewWebUI<FeedbackUI>; | 239 return &NewWebUI<FeedbackUI>; |
| 235 if (url.host() == chrome::kChromeUIHelpFrameHost) | 240 if (url.host() == chrome::kChromeUIHelpFrameHost) |
| 236 return &NewWebUI<HelpUI>; | 241 return &NewWebUI<HelpUI>; |
| 237 if (url.host() == chrome::kChromeUISettingsFrameHost) | 242 if (url.host() == chrome::kChromeUISettingsFrameHost) |
| 238 return &NewWebUI<options2::OptionsUI>; | 243 return &NewWebUI<options2::OptionsUI>; |
| (...skipping 288 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 527 if (page_url.host() == chrome::kChromeUISettingsFrameHost) | 532 if (page_url.host() == chrome::kChromeUISettingsFrameHost) |
| 528 return options2::OptionsUI::GetFaviconResourceBytes(); | 533 return options2::OptionsUI::GetFaviconResourceBytes(); |
| 529 | 534 |
| 530 // Android doesn't use the plugins pages. | 535 // Android doesn't use the plugins pages. |
| 531 if (page_url.host() == chrome::kChromeUIPluginsHost) | 536 if (page_url.host() == chrome::kChromeUIPluginsHost) |
| 532 return PluginsUI::GetFaviconResourceBytes(); | 537 return PluginsUI::GetFaviconResourceBytes(); |
| 533 #endif | 538 #endif |
| 534 | 539 |
| 535 return NULL; | 540 return NULL; |
| 536 } | 541 } |
| OLD | NEW |