Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(293)

Unified Diff: chrome/browser/ui/webui/chrome_web_ui_controller_factory.cc

Issue 1391893003: NOT FOR REVIEW: Aura on Android (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: chrome/browser/ui/webui/chrome_web_ui_controller_factory.cc
diff --git a/chrome/browser/ui/webui/chrome_web_ui_controller_factory.cc b/chrome/browser/ui/webui/chrome_web_ui_controller_factory.cc
index b50ce8593454df01f86cab5c3e0213c9933deab2..d117adcf07af215a81f7153841a002911d1541f9 100644
--- a/chrome/browser/ui/webui/chrome_web_ui_controller_factory.cc
+++ b/chrome/browser/ui/webui/chrome_web_ui_controller_factory.cc
@@ -92,7 +92,7 @@
#include "chrome/browser/ui/webui/media_router/media_router_ui.h"
#endif
-#if !defined(OS_ANDROID)
+#if !defined(OS_ANDROID) || defined(USE_AURA)
#include "chrome/browser/ui/webui/ntp/new_tab_ui.h"
#include "chrome/browser/ui/webui/quota_internals/quota_internals_ui.h"
#include "chrome/browser/ui/webui/sync_file_system_internals/sync_file_system_internals_ui.h"
@@ -361,6 +361,19 @@ WebUIFactoryFunction GetWebUIFactoryFunction(WebUI* web_ui,
/****************************************************************************
* OS Specific #defines
***************************************************************************/
+#if !defined(OS_ANDROID) || defined(USE_AURA)
+ if (url.host() == chrome::kChromeUINewTabHost)
+ return &NewWebUI<NewTabUI>;
+ // Settings are implemented with native UI elements on non-Aura Android.
+ // Handle chrome://settings if settings in a window and about in settings
+ // are enabled.
+ if (url.host() == chrome::kChromeUISettingsFrameHost ||
+ (url.host() == chrome::kChromeUISettingsHost &&
+ ::switches::AboutInSettingsEnabled())) {
+ return &NewWebUI<options::OptionsUI>;
+ }
+#endif
+
#if !defined(OS_ANDROID)
#if !defined(OS_CHROMEOS)
// AppLauncherPage is not needed on Android or ChromeOS.
@@ -388,8 +401,6 @@ WebUIFactoryFunction GetWebUIFactoryFunction(WebUI* web_ui,
// Identity API is not available on Android.
if (url.host() == chrome::kChromeUIIdentityInternalsHost)
return &NewWebUI<IdentityInternalsUI>;
- if (url.host() == chrome::kChromeUINewTabHost)
- return &NewWebUI<NewTabUI>;
if (url.host() == chrome::kChromeUIMdSettingsHost &&
::switches::MdSettingsEnabled()) {
return &NewWebUI<settings::MdSettingsUI>;
@@ -399,14 +410,6 @@ WebUIFactoryFunction GetWebUIFactoryFunction(WebUI* web_ui,
return &NewWebUI<PluginsUI>;
if (url.host() == chrome::kChromeUIQuotaInternalsHost)
return &NewWebUI<QuotaInternalsUI>;
- // Settings are implemented with native UI elements on Android.
- // Handle chrome://settings if settings in a window and about in settings
- // are enabled.
- if (url.host() == chrome::kChromeUISettingsFrameHost ||
- (url.host() == chrome::kChromeUISettingsHost &&
- ::switches::AboutInSettingsEnabled())) {
- return &NewWebUI<options::OptionsUI>;
- }
if (url.host() == chrome::kChromeUISyncFileSystemInternalsHost)
return &NewWebUI<SyncFileSystemInternalsUI>;
if (url.host() == chrome::kChromeUISystemInfoHost)

Powered by Google App Engine
This is Rietveld 408576698