| 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 73 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 84 #endif | 84 #endif |
| 85 | 85 |
| 86 #if defined(ENABLE_WEBRTC) | 86 #if defined(ENABLE_WEBRTC) |
| 87 #include "chrome/browser/ui/webui/media/webrtc_logs_ui.h" | 87 #include "chrome/browser/ui/webui/media/webrtc_logs_ui.h" |
| 88 #endif | 88 #endif |
| 89 | 89 |
| 90 #if defined(ENABLE_PRINT_PREVIEW) | 90 #if defined(ENABLE_PRINT_PREVIEW) |
| 91 #include "chrome/browser/ui/webui/print_preview/print_preview_ui.h" | 91 #include "chrome/browser/ui/webui/print_preview/print_preview_ui.h" |
| 92 #endif | 92 #endif |
| 93 | 93 |
| 94 #if defined(ENABLE_MEDIA_ROUTER) && !defined(OS_ANDROID) | 94 #if defined(ENABLE_MEDIA_ROUTER) |
| 95 #if !defined(OS_ANDROID) |
| 95 #include "chrome/browser/media/router/media_router_feature.h" | 96 #include "chrome/browser/media/router/media_router_feature.h" |
| 96 #include "chrome/browser/ui/webui/media_router/media_router_ui.h" | 97 #include "chrome/browser/ui/webui/media_router/media_router_ui.h" |
| 97 #endif | 98 #endif |
| 99 #if defined(OS_WIN) || defined(OS_MACOSX) || defined(OS_CHROMEOS) |
| 100 #include "chrome/browser/ui/webui/cast/cast_ui.h" |
| 101 #endif |
| 102 #endif |
| 98 | 103 |
| 99 #if defined(OS_ANDROID) | 104 #if defined(OS_ANDROID) |
| 100 #include "chrome/browser/ui/webui/net_export_ui.h" | 105 #include "chrome/browser/ui/webui/net_export_ui.h" |
| 101 #include "chrome/browser/ui/webui/popular_sites_internals_ui.h" | 106 #include "chrome/browser/ui/webui/popular_sites_internals_ui.h" |
| 102 #include "chrome/browser/ui/webui/snippets_internals_ui.h" | 107 #include "chrome/browser/ui/webui/snippets_internals_ui.h" |
| 103 #else | 108 #else |
| 104 #include "chrome/browser/signin/easy_unlock_service.h" | 109 #include "chrome/browser/signin/easy_unlock_service.h" |
| 105 #include "chrome/browser/signin/easy_unlock_service_factory.h" | 110 #include "chrome/browser/signin/easy_unlock_service_factory.h" |
| 106 #include "chrome/browser/ui/webui/copresence_ui.h" | 111 #include "chrome/browser/ui/webui/copresence_ui.h" |
| 107 #include "chrome/browser/ui/webui/devtools_ui.h" | 112 #include "chrome/browser/ui/webui/devtools_ui.h" |
| (...skipping 452 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 560 #endif | 565 #endif |
| 561 #if defined(ENABLE_SERVICE_DISCOVERY) | 566 #if defined(ENABLE_SERVICE_DISCOVERY) |
| 562 if (url.host() == chrome::kChromeUIDevicesHost) { | 567 if (url.host() == chrome::kChromeUIDevicesHost) { |
| 563 return &NewWebUI<LocalDiscoveryUI>; | 568 return &NewWebUI<LocalDiscoveryUI>; |
| 564 } | 569 } |
| 565 #endif | 570 #endif |
| 566 #if defined(ENABLE_WEBRTC) | 571 #if defined(ENABLE_WEBRTC) |
| 567 if (url.host() == chrome::kChromeUIWebRtcLogsHost) | 572 if (url.host() == chrome::kChromeUIWebRtcLogsHost) |
| 568 return &NewWebUI<WebRtcLogsUI>; | 573 return &NewWebUI<WebRtcLogsUI>; |
| 569 #endif | 574 #endif |
| 570 #if defined(ENABLE_MEDIA_ROUTER) && !defined(OS_ANDROID) | 575 #if defined(ENABLE_MEDIA_ROUTER) |
| 576 #if !defined(OS_ANDROID) |
| 571 if (url.host() == chrome::kChromeUIMediaRouterHost && | 577 if (url.host() == chrome::kChromeUIMediaRouterHost && |
| 572 media_router::MediaRouterEnabled(profile)) { | 578 media_router::MediaRouterEnabled(profile)) { |
| 573 return &NewWebUI<media_router::MediaRouterUI>; | 579 return &NewWebUI<media_router::MediaRouterUI>; |
| 574 } | 580 } |
| 575 #endif | 581 #endif |
| 582 #if defined(OS_WIN) || defined(OS_MACOSX) || defined(OS_CHROMEOS) |
| 583 if (url.host() == chrome::kChromeUICastHost && |
| 584 media_router::MediaRouterEnabled(profile)) { |
| 585 return &NewWebUI<CastUI>; |
| 586 } |
| 587 #endif |
| 588 #endif |
| 576 if (IsAboutUI(url)) | 589 if (IsAboutUI(url)) |
| 577 return &NewWebUI<AboutUI>; | 590 return &NewWebUI<AboutUI>; |
| 578 | 591 |
| 579 if (dom_distiller::IsEnableDomDistillerSet() && | 592 if (dom_distiller::IsEnableDomDistillerSet() && |
| 580 url.host() == dom_distiller::kChromeUIDomDistillerHost) { | 593 url.host() == dom_distiller::kChromeUIDomDistillerHost) { |
| 581 return &NewWebUI<dom_distiller::DomDistillerUi>; | 594 return &NewWebUI<dom_distiller::DomDistillerUi>; |
| 582 } | 595 } |
| 583 | 596 |
| 584 if (SiteEngagementService::IsEnabled() && | 597 if (SiteEngagementService::IsEnabled() && |
| 585 url.host() == chrome::kChromeUISiteEngagementHost) { | 598 url.host() == chrome::kChromeUISiteEngagementHost) { |
| (...skipping 189 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 775 #endif | 788 #endif |
| 776 | 789 |
| 777 // Android doesn't use the plugins pages. | 790 // Android doesn't use the plugins pages. |
| 778 if (page_url.host() == chrome::kChromeUIPluginsHost) | 791 if (page_url.host() == chrome::kChromeUIPluginsHost) |
| 779 return PluginsUI::GetFaviconResourceBytes(scale_factor); | 792 return PluginsUI::GetFaviconResourceBytes(scale_factor); |
| 780 | 793 |
| 781 #endif | 794 #endif |
| 782 | 795 |
| 783 return NULL; | 796 return NULL; |
| 784 } | 797 } |
| OLD | NEW |