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 372 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
383 return &NewWebUI<InspectUI>; | 383 return &NewWebUI<InspectUI>; |
384 // Performance monitoring page is not on Android for now. | 384 // Performance monitoring page is not on Android for now. |
385 if (url.host() == chrome::kChromeUIPerformanceMonitorHost) | 385 if (url.host() == chrome::kChromeUIPerformanceMonitorHost) |
386 return &NewWebUI<performance_monitor::PerformanceMonitorUI>; | 386 return &NewWebUI<performance_monitor::PerformanceMonitorUI>; |
387 // Android does not support plugins for now. | 387 // Android does not support plugins for now. |
388 if (url.host() == chrome::kChromeUIPluginsHost) | 388 if (url.host() == chrome::kChromeUIPluginsHost) |
389 return &NewWebUI<PluginsUI>; | 389 return &NewWebUI<PluginsUI>; |
390 if (url.host() == chrome::kChromeUIQuotaInternalsHost) | 390 if (url.host() == chrome::kChromeUIQuotaInternalsHost) |
391 return &NewWebUI<QuotaInternalsUI>; | 391 return &NewWebUI<QuotaInternalsUI>; |
392 // Settings are implemented with native UI elements on Android. | 392 // Settings are implemented with native UI elements on Android. |
393 if (url.host() == chrome::kChromeUISettingsFrameHost) | 393 // Handle chrome://settings if settings in a window and about in settings |
| 394 // are enabled. |
| 395 if (url.host() == chrome::kChromeUISettingsFrameHost || |
| 396 (url.host() == chrome::kChromeUISettingsHost && |
| 397 ::switches::AboutInSettingsEnabled())) { |
394 return &NewWebUI<options::OptionsUI>; | 398 return &NewWebUI<options::OptionsUI>; |
| 399 } |
395 if (url.host() == chrome::kChromeUISuggestionsInternalsHost) | 400 if (url.host() == chrome::kChromeUISuggestionsInternalsHost) |
396 return &NewWebUI<SuggestionsInternalsUI>; | 401 return &NewWebUI<SuggestionsInternalsUI>; |
397 if (url.host() == chrome::kChromeUISyncFileSystemInternalsHost) | 402 if (url.host() == chrome::kChromeUISyncFileSystemInternalsHost) |
398 return &NewWebUI<SyncFileSystemInternalsUI>; | 403 return &NewWebUI<SyncFileSystemInternalsUI>; |
399 if (url.host() == chrome::kChromeUISystemInfoHost) | 404 if (url.host() == chrome::kChromeUISystemInfoHost) |
400 return &NewWebUI<SystemInfoUI>; | 405 return &NewWebUI<SystemInfoUI>; |
401 // Uber frame is not used on Android. | 406 // Uber frame is not used on Android. |
402 if (url.host() == chrome::kChromeUIUberFrameHost) | 407 if (url.host() == chrome::kChromeUIUberFrameHost) |
403 return &NewWebUI<UberFrameUI>; | 408 return &NewWebUI<UberFrameUI>; |
404 // Uber page is not used on Android. | 409 // Uber page is not used on Android. |
(...skipping 316 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
721 #endif | 726 #endif |
722 | 727 |
723 // Android doesn't use the plugins pages. | 728 // Android doesn't use the plugins pages. |
724 if (page_url.host() == chrome::kChromeUIPluginsHost) | 729 if (page_url.host() == chrome::kChromeUIPluginsHost) |
725 return PluginsUI::GetFaviconResourceBytes(scale_factor); | 730 return PluginsUI::GetFaviconResourceBytes(scale_factor); |
726 | 731 |
727 #endif | 732 #endif |
728 | 733 |
729 return NULL; | 734 return NULL; |
730 } | 735 } |
OLD | NEW |