| 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 <stddef.h> | 7 #include <stddef.h> |
| 8 | 8 |
| 9 #include <vector> | 9 #include <vector> |
| 10 | 10 |
| (...skipping 144 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 155 #endif | 155 #endif |
| 156 | 156 |
| 157 #if !defined(OS_CHROMEOS) | 157 #if !defined(OS_CHROMEOS) |
| 158 #include "chrome/browser/ui/webui/app_launcher_page_ui.h" | 158 #include "chrome/browser/ui/webui/app_launcher_page_ui.h" |
| 159 #endif | 159 #endif |
| 160 | 160 |
| 161 #if !defined(OS_CHROMEOS) && !defined(OS_ANDROID) | 161 #if !defined(OS_CHROMEOS) && !defined(OS_ANDROID) |
| 162 #include "chrome/browser/ui/sync/sync_promo_ui.h" | 162 #include "chrome/browser/ui/sync/sync_promo_ui.h" |
| 163 #include "chrome/browser/ui/webui/signin/inline_login_ui.h" | 163 #include "chrome/browser/ui/webui/signin/inline_login_ui.h" |
| 164 #include "chrome/browser/ui/webui/signin/md_user_manager_ui.h" | 164 #include "chrome/browser/ui/webui/signin/md_user_manager_ui.h" |
| 165 #include "chrome/browser/ui/webui/signin/signin_dice_internals_ui.h" |
| 165 #include "chrome/browser/ui/webui/signin/signin_email_confirmation_ui.h" | 166 #include "chrome/browser/ui/webui/signin/signin_email_confirmation_ui.h" |
| 166 #include "chrome/browser/ui/webui/signin/signin_error_ui.h" | 167 #include "chrome/browser/ui/webui/signin/signin_error_ui.h" |
| 167 #include "chrome/browser/ui/webui/signin/sync_confirmation_ui.h" | 168 #include "chrome/browser/ui/webui/signin/sync_confirmation_ui.h" |
| 168 #include "chrome/browser/ui/webui/welcome_ui.h" | 169 #include "chrome/browser/ui/webui/welcome_ui.h" |
| 169 #endif | 170 #endif |
| 170 | 171 |
| 171 #if defined(OS_WIN) | 172 #if defined(OS_WIN) |
| 172 #include "chrome/browser/ui/webui/conflicts_ui.h" | 173 #include "chrome/browser/ui/webui/conflicts_ui.h" |
| 173 #include "chrome/browser/ui/webui/set_as_default_browser_ui_win.h" | 174 #include "chrome/browser/ui/webui/set_as_default_browser_ui_win.h" |
| 174 #include "chrome/browser/ui/webui/welcome_win10_ui.h" | 175 #include "chrome/browser/ui/webui/welcome_win10_ui.h" |
| (...skipping 214 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 389 /**************************************************************************** | 390 /**************************************************************************** |
| 390 * OS Specific #defines | 391 * OS Specific #defines |
| 391 ***************************************************************************/ | 392 ***************************************************************************/ |
| 392 #if !defined(OS_ANDROID) | 393 #if !defined(OS_ANDROID) |
| 393 #if !defined(OS_CHROMEOS) | 394 #if !defined(OS_CHROMEOS) |
| 394 // AppLauncherPage is not needed on Android or ChromeOS. | 395 // AppLauncherPage is not needed on Android or ChromeOS. |
| 395 if (url.host_piece() == chrome::kChromeUIAppLauncherPageHost && profile && | 396 if (url.host_piece() == chrome::kChromeUIAppLauncherPageHost && profile && |
| 396 extensions::ExtensionSystem::Get(profile)->extension_service()) { | 397 extensions::ExtensionSystem::Get(profile)->extension_service()) { |
| 397 return &NewWebUI<AppLauncherPageUI>; | 398 return &NewWebUI<AppLauncherPageUI>; |
| 398 } | 399 } |
| 400 // Desktop Identity Consistency is only available on Windows, Linux and macOS. |
| 401 if (url.host() == chrome::kChromeUISigninDiceInternalsHost && |
| 402 !profile->IsOffTheRecord() && |
| 403 switches::IsAccountConsistencyDiceEnabled()) { |
| 404 return &NewWebUI<SigninDiceInternalsUI>; |
| 405 } |
| 399 #endif // defined(OS_CHROMEOS) | 406 #endif // defined(OS_CHROMEOS) |
| 400 | 407 |
| 401 // Bookmarks are part of NTP on Android. | 408 // Bookmarks are part of NTP on Android. |
| 402 if (url.host_piece() == chrome::kChromeUIBookmarksHost) { | 409 if (url.host_piece() == chrome::kChromeUIBookmarksHost) { |
| 403 return MdBookmarksUI::IsEnabled() ? &NewWebUI<MdBookmarksUI> | 410 return MdBookmarksUI::IsEnabled() ? &NewWebUI<MdBookmarksUI> |
| 404 : &NewWebUI<BookmarksUI>; | 411 : &NewWebUI<BookmarksUI>; |
| 405 } | 412 } |
| 406 // Downloads list on Android uses the built-in download manager. | 413 // Downloads list on Android uses the built-in download manager. |
| 407 if (url.host_piece() == chrome::kChromeUIDownloadsHost) | 414 if (url.host_piece() == chrome::kChromeUIDownloadsHost) |
| 408 return &NewWebUI<MdDownloadsUI>; | 415 return &NewWebUI<MdDownloadsUI>; |
| (...skipping 384 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 793 | 800 |
| 794 #if BUILDFLAG(ENABLE_EXTENSIONS) | 801 #if BUILDFLAG(ENABLE_EXTENSIONS) |
| 795 if (page_url.host_piece() == chrome::kChromeUIExtensionsHost || | 802 if (page_url.host_piece() == chrome::kChromeUIExtensionsHost || |
| 796 page_url.host_piece() == chrome::kChromeUIExtensionsFrameHost) | 803 page_url.host_piece() == chrome::kChromeUIExtensionsFrameHost) |
| 797 return extensions::ExtensionsUI::GetFaviconResourceBytes(scale_factor); | 804 return extensions::ExtensionsUI::GetFaviconResourceBytes(scale_factor); |
| 798 #endif // BUILDFLAG(ENABLE_EXTENSIONS) | 805 #endif // BUILDFLAG(ENABLE_EXTENSIONS) |
| 799 #endif // !defined(OS_ANDROID) | 806 #endif // !defined(OS_ANDROID) |
| 800 | 807 |
| 801 return NULL; | 808 return NULL; |
| 802 } | 809 } |
| OLD | NEW |