| 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 78 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 89 #include "chrome/browser/ui/webui/print_preview/print_preview_ui.h" | 89 #include "chrome/browser/ui/webui/print_preview/print_preview_ui.h" |
| 90 #endif | 90 #endif |
| 91 | 91 |
| 92 #if defined(ENABLE_MEDIA_ROUTER) | 92 #if defined(ENABLE_MEDIA_ROUTER) |
| 93 #include "chrome/browser/ui/webui/media_router/media_router_ui.h" | 93 #include "chrome/browser/ui/webui/media_router/media_router_ui.h" |
| 94 #endif | 94 #endif |
| 95 | 95 |
| 96 #if !defined(OS_ANDROID) | 96 #if !defined(OS_ANDROID) |
| 97 #include "chrome/browser/ui/webui/ntp/new_tab_ui.h" | 97 #include "chrome/browser/ui/webui/ntp/new_tab_ui.h" |
| 98 #include "chrome/browser/ui/webui/quota_internals/quota_internals_ui.h" | 98 #include "chrome/browser/ui/webui/quota_internals/quota_internals_ui.h" |
| 99 #include "chrome/browser/ui/webui/suggestions_internals/suggestions_internals_ui
.h" | |
| 100 #include "chrome/browser/ui/webui/sync_file_system_internals/sync_file_system_in
ternals_ui.h" | 99 #include "chrome/browser/ui/webui/sync_file_system_internals/sync_file_system_in
ternals_ui.h" |
| 101 #include "chrome/browser/ui/webui/system_info_ui.h" | 100 #include "chrome/browser/ui/webui/system_info_ui.h" |
| 102 #include "chrome/browser/ui/webui/uber/uber_ui.h" | 101 #include "chrome/browser/ui/webui/uber/uber_ui.h" |
| 103 #endif | 102 #endif |
| 104 | 103 |
| 105 #if defined(OS_ANDROID) || defined(OS_IOS) | 104 #if defined(OS_ANDROID) || defined(OS_IOS) |
| 106 #include "chrome/browser/ui/webui/net_export_ui.h" | 105 #include "chrome/browser/ui/webui/net_export_ui.h" |
| 107 #else | 106 #else |
| 108 #include "chrome/browser/devtools/device/webrtc/webrtc_device_provider.h" | 107 #include "chrome/browser/devtools/device/webrtc/webrtc_device_provider.h" |
| 109 #include "chrome/browser/ui/webui/copresence_ui.h" | 108 #include "chrome/browser/ui/webui/copresence_ui.h" |
| (...skipping 289 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 399 if (url.host() == chrome::kChromeUIQuotaInternalsHost) | 398 if (url.host() == chrome::kChromeUIQuotaInternalsHost) |
| 400 return &NewWebUI<QuotaInternalsUI>; | 399 return &NewWebUI<QuotaInternalsUI>; |
| 401 // Settings are implemented with native UI elements on Android. | 400 // Settings are implemented with native UI elements on Android. |
| 402 // Handle chrome://settings if settings in a window and about in settings | 401 // Handle chrome://settings if settings in a window and about in settings |
| 403 // are enabled. | 402 // are enabled. |
| 404 if (url.host() == chrome::kChromeUISettingsFrameHost || | 403 if (url.host() == chrome::kChromeUISettingsFrameHost || |
| 405 (url.host() == chrome::kChromeUISettingsHost && | 404 (url.host() == chrome::kChromeUISettingsHost && |
| 406 ::switches::AboutInSettingsEnabled())) { | 405 ::switches::AboutInSettingsEnabled())) { |
| 407 return &NewWebUI<options::OptionsUI>; | 406 return &NewWebUI<options::OptionsUI>; |
| 408 } | 407 } |
| 409 if (url.host() == chrome::kChromeUISuggestionsInternalsHost) | |
| 410 return &NewWebUI<SuggestionsInternalsUI>; | |
| 411 if (url.host() == chrome::kChromeUISyncFileSystemInternalsHost) | 408 if (url.host() == chrome::kChromeUISyncFileSystemInternalsHost) |
| 412 return &NewWebUI<SyncFileSystemInternalsUI>; | 409 return &NewWebUI<SyncFileSystemInternalsUI>; |
| 413 if (url.host() == chrome::kChromeUISystemInfoHost) | 410 if (url.host() == chrome::kChromeUISystemInfoHost) |
| 414 return &NewWebUI<SystemInfoUI>; | 411 return &NewWebUI<SystemInfoUI>; |
| 415 // Uber frame is not used on Android. | 412 // Uber frame is not used on Android. |
| 416 if (url.host() == chrome::kChromeUIUberFrameHost) | 413 if (url.host() == chrome::kChromeUIUberFrameHost) |
| 417 return &NewWebUI<UberFrameUI>; | 414 return &NewWebUI<UberFrameUI>; |
| 418 // Uber page is not used on Android. | 415 // Uber page is not used on Android. |
| 419 if (url.host() == chrome::kChromeUIUberHost) | 416 if (url.host() == chrome::kChromeUIUberHost) |
| 420 return &NewWebUI<UberUI>; | 417 return &NewWebUI<UberUI>; |
| (...skipping 335 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 756 #endif | 753 #endif |
| 757 | 754 |
| 758 // Android doesn't use the plugins pages. | 755 // Android doesn't use the plugins pages. |
| 759 if (page_url.host() == chrome::kChromeUIPluginsHost) | 756 if (page_url.host() == chrome::kChromeUIPluginsHost) |
| 760 return PluginsUI::GetFaviconResourceBytes(scale_factor); | 757 return PluginsUI::GetFaviconResourceBytes(scale_factor); |
| 761 | 758 |
| 762 #endif | 759 #endif |
| 763 | 760 |
| 764 return NULL; | 761 return NULL; |
| 765 } | 762 } |
| OLD | NEW |