| 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 <vector> | 7 #include <vector> |
| 8 | 8 |
| 9 #include "base/bind.h" | 9 #include "base/bind.h" |
| 10 #include "base/command_line.h" | 10 #include "base/command_line.h" |
| (...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 81 #endif | 81 #endif |
| 82 | 82 |
| 83 #if defined(ENABLE_WEBRTC) | 83 #if defined(ENABLE_WEBRTC) |
| 84 #include "chrome/browser/ui/webui/media/webrtc_logs_ui.h" | 84 #include "chrome/browser/ui/webui/media/webrtc_logs_ui.h" |
| 85 #endif | 85 #endif |
| 86 | 86 |
| 87 #if defined(ENABLE_FULL_PRINTING) | 87 #if defined(ENABLE_FULL_PRINTING) |
| 88 #include "chrome/browser/ui/webui/print_preview/print_preview_ui.h" | 88 #include "chrome/browser/ui/webui/print_preview/print_preview_ui.h" |
| 89 #endif | 89 #endif |
| 90 | 90 |
| 91 #if defined(OS_ANDROID) | 91 #if !defined(OS_ANDROID) |
| 92 #include "chrome/browser/ui/webui/welcome_ui_android.h" | |
| 93 #else | |
| 94 #include "chrome/browser/ui/webui/ntp/new_tab_ui.h" | 92 #include "chrome/browser/ui/webui/ntp/new_tab_ui.h" |
| 95 #include "chrome/browser/ui/webui/quota_internals/quota_internals_ui.h" | 93 #include "chrome/browser/ui/webui/quota_internals/quota_internals_ui.h" |
| 96 #include "chrome/browser/ui/webui/suggestions_internals/suggestions_internals_ui
.h" | 94 #include "chrome/browser/ui/webui/suggestions_internals/suggestions_internals_ui
.h" |
| 97 #include "chrome/browser/ui/webui/sync_file_system_internals/sync_file_system_in
ternals_ui.h" | 95 #include "chrome/browser/ui/webui/sync_file_system_internals/sync_file_system_in
ternals_ui.h" |
| 98 #include "chrome/browser/ui/webui/system_info_ui.h" | 96 #include "chrome/browser/ui/webui/system_info_ui.h" |
| 99 #include "chrome/browser/ui/webui/uber/uber_ui.h" | 97 #include "chrome/browser/ui/webui/uber/uber_ui.h" |
| 100 #endif | 98 #endif |
| 101 | 99 |
| 102 #if defined(OS_ANDROID) || defined(OS_IOS) | 100 #if defined(OS_ANDROID) || defined(OS_IOS) |
| 103 #include "chrome/browser/ui/webui/net_export_ui.h" | 101 #include "chrome/browser/ui/webui/net_export_ui.h" |
| (...skipping 235 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 339 return &NewWebUI<WebRtcLogsUI>; | 337 return &NewWebUI<WebRtcLogsUI>; |
| 340 #endif | 338 #endif |
| 341 #if defined(ENABLE_APP_LIST) | 339 #if defined(ENABLE_APP_LIST) |
| 342 if (url.host() == chrome::kChromeUIAppListStartPageHost) | 340 if (url.host() == chrome::kChromeUIAppListStartPageHost) |
| 343 return &NewWebUI<app_list::StartPageUI>; | 341 return &NewWebUI<app_list::StartPageUI>; |
| 344 #endif | 342 #endif |
| 345 | 343 |
| 346 /**************************************************************************** | 344 /**************************************************************************** |
| 347 * OS Specific #defines | 345 * OS Specific #defines |
| 348 ***************************************************************************/ | 346 ***************************************************************************/ |
| 349 #if defined(OS_ANDROID) | 347 #if !defined(OS_ANDROID) |
| 350 if (url.host() == chrome::kChromeUIWelcomeHost) | |
| 351 return &NewWebUI<WelcomeUI>; | |
| 352 #else | |
| 353 // AppLauncherPage is not needed on Android. | 348 // AppLauncherPage is not needed on Android. |
| 354 if (url.host() == chrome::kChromeUIAppLauncherPageHost && | 349 if (url.host() == chrome::kChromeUIAppLauncherPageHost && |
| 355 profile && extensions::ExtensionSystem::Get(profile)-> | 350 profile && extensions::ExtensionSystem::Get(profile)-> |
| 356 extension_service()) { | 351 extension_service()) { |
| 357 return &NewWebUI<AppLauncherPageUI>; | 352 return &NewWebUI<AppLauncherPageUI>; |
| 358 } | 353 } |
| 359 // Bookmarks are part of NTP on Android. | 354 // Bookmarks are part of NTP on Android. |
| 360 if (url.host() == chrome::kChromeUIBookmarksHost) | 355 if (url.host() == chrome::kChromeUIBookmarksHost) |
| 361 return &NewWebUI<BookmarksUI>; | 356 return &NewWebUI<BookmarksUI>; |
| 362 if (url.SchemeIs(content::kChromeDevToolsScheme)) | 357 if (url.SchemeIs(content::kChromeDevToolsScheme)) |
| (...skipping 362 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 725 #endif | 720 #endif |
| 726 | 721 |
| 727 // Android doesn't use the plugins pages. | 722 // Android doesn't use the plugins pages. |
| 728 if (page_url.host() == chrome::kChromeUIPluginsHost) | 723 if (page_url.host() == chrome::kChromeUIPluginsHost) |
| 729 return PluginsUI::GetFaviconResourceBytes(scale_factor); | 724 return PluginsUI::GetFaviconResourceBytes(scale_factor); |
| 730 | 725 |
| 731 #endif | 726 #endif |
| 732 | 727 |
| 733 return NULL; | 728 return NULL; |
| 734 } | 729 } |
| OLD | NEW |