| 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 376 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 387 if (url.host() == chrome::kChromeUIGCMInternalsHost) | 387 if (url.host() == chrome::kChromeUIGCMInternalsHost) |
| 388 return &NewWebUI<GCMInternalsUI>; | 388 return &NewWebUI<GCMInternalsUI>; |
| 389 // Help is implemented with native UI elements on Android. | 389 // Help is implemented with native UI elements on Android. |
| 390 if (url.host() == chrome::kChromeUIHelpFrameHost) | 390 if (url.host() == chrome::kChromeUIHelpFrameHost) |
| 391 return &NewWebUI<HelpUI>; | 391 return &NewWebUI<HelpUI>; |
| 392 // Identity API is not available on Android. | 392 // Identity API is not available on Android. |
| 393 if (url.host() == chrome::kChromeUIIdentityInternalsHost) | 393 if (url.host() == chrome::kChromeUIIdentityInternalsHost) |
| 394 return &NewWebUI<IdentityInternalsUI>; | 394 return &NewWebUI<IdentityInternalsUI>; |
| 395 if (url.host() == chrome::kChromeUINewTabHost) | 395 if (url.host() == chrome::kChromeUINewTabHost) |
| 396 return &NewWebUI<NewTabUI>; | 396 return &NewWebUI<NewTabUI>; |
| 397 if (url.host() == chrome::kChromeUIMdSettingsHost && | 397 if (url.host() == chrome::kChromeUIMdSettingsHost) |
| 398 ::switches::MdSettingsEnabled()) { | |
| 399 return &NewWebUI<settings::MdSettingsUI>; | 398 return &NewWebUI<settings::MdSettingsUI>; |
| 400 } | |
| 401 // If the material design extensions page is enabled, it gets its own host. | 399 // If the material design extensions page is enabled, it gets its own host. |
| 402 // Otherwise, it's handled by the uber settings page. | 400 // Otherwise, it's handled by the uber settings page. |
| 403 if (url.host() == chrome::kChromeUIExtensionsHost && | 401 if (url.host() == chrome::kChromeUIExtensionsHost && |
| 404 ::switches::MdExtensionsEnabled()) { | 402 ::switches::MdExtensionsEnabled()) { |
| 405 return &NewWebUI<extensions::ExtensionsUI>; | 403 return &NewWebUI<extensions::ExtensionsUI>; |
| 406 } | 404 } |
| 407 if (url.host() == chrome::kChromeUIQuotaInternalsHost) | 405 if (url.host() == chrome::kChromeUIQuotaInternalsHost) |
| 408 return &NewWebUI<QuotaInternalsUI>; | 406 return &NewWebUI<QuotaInternalsUI>; |
| 409 // Settings are implemented with native UI elements on Android. | 407 // Settings are implemented with native UI elements on Android. |
| 410 // Handle chrome://settings if settings in a window and about in settings | 408 // Handle chrome://settings if settings in a window and about in settings |
| (...skipping 359 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 770 #endif | 768 #endif |
| 771 | 769 |
| 772 // Android doesn't use the plugins pages. | 770 // Android doesn't use the plugins pages. |
| 773 if (page_url.host() == chrome::kChromeUIPluginsHost) | 771 if (page_url.host() == chrome::kChromeUIPluginsHost) |
| 774 return PluginsUI::GetFaviconResourceBytes(scale_factor); | 772 return PluginsUI::GetFaviconResourceBytes(scale_factor); |
| 775 | 773 |
| 776 #endif | 774 #endif |
| 777 | 775 |
| 778 return NULL; | 776 return NULL; |
| 779 } | 777 } |
| OLD | NEW |