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