| 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 61 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 72 #include "components/favicon/core/favicon_service.h" | 72 #include "components/favicon/core/favicon_service.h" |
| 73 #include "components/favicon_base/favicon_util.h" | 73 #include "components/favicon_base/favicon_util.h" |
| 74 #include "components/favicon_base/select_favicon_frames.h" | 74 #include "components/favicon_base/select_favicon_frames.h" |
| 75 #include "components/history/core/browser/history_types.h" | 75 #include "components/history/core/browser/history_types.h" |
| 76 #include "components/prefs/pref_service.h" | 76 #include "components/prefs/pref_service.h" |
| 77 #include "components/signin/core/common/profile_management_switches.h" | 77 #include "components/signin/core/common/profile_management_switches.h" |
| 78 #include "content/public/browser/web_contents.h" | 78 #include "content/public/browser/web_contents.h" |
| 79 #include "content/public/browser/web_ui.h" | 79 #include "content/public/browser/web_ui.h" |
| 80 #include "content/public/common/content_client.h" | 80 #include "content/public/common/content_client.h" |
| 81 #include "content/public/common/url_utils.h" | 81 #include "content/public/common/url_utils.h" |
| 82 #include "printing/features/features.h" |
| 82 #include "ui/gfx/favicon_size.h" | 83 #include "ui/gfx/favicon_size.h" |
| 83 #include "ui/web_dialogs/web_dialog_ui.h" | 84 #include "ui/web_dialogs/web_dialog_ui.h" |
| 84 #include "url/gurl.h" | 85 #include "url/gurl.h" |
| 85 | 86 |
| 86 #if !defined(DISABLE_NACL) | 87 #if !defined(DISABLE_NACL) |
| 87 #include "chrome/browser/ui/webui/nacl_ui.h" | 88 #include "chrome/browser/ui/webui/nacl_ui.h" |
| 88 #endif | 89 #endif |
| 89 | 90 |
| 90 #if defined(ENABLE_WEBRTC) | 91 #if defined(ENABLE_WEBRTC) |
| 91 #include "chrome/browser/ui/webui/media/webrtc_logs_ui.h" | 92 #include "chrome/browser/ui/webui/media/webrtc_logs_ui.h" |
| 92 #endif | 93 #endif |
| 93 | 94 |
| 94 #if defined(ENABLE_PRINT_PREVIEW) | 95 #if BUILDFLAG(ENABLE_PRINT_PREVIEW) |
| 95 #include "chrome/browser/ui/webui/print_preview/print_preview_ui.h" | 96 #include "chrome/browser/ui/webui/print_preview/print_preview_ui.h" |
| 96 #endif | 97 #endif |
| 97 | 98 |
| 98 #if defined(ENABLE_MEDIA_ROUTER) | 99 #if defined(ENABLE_MEDIA_ROUTER) |
| 99 #if !defined(OS_ANDROID) | 100 #if !defined(OS_ANDROID) |
| 100 #include "chrome/browser/media/router/media_router_feature.h" | 101 #include "chrome/browser/media/router/media_router_feature.h" |
| 101 #include "chrome/browser/ui/webui/media_router/media_router_ui.h" | 102 #include "chrome/browser/ui/webui/media_router/media_router_ui.h" |
| 102 #endif | 103 #endif |
| 103 #if defined(OS_WIN) || defined(OS_MACOSX) || defined(OS_CHROMEOS) | 104 #if defined(OS_WIN) || defined(OS_MACOSX) || defined(OS_CHROMEOS) |
| 104 #include "chrome/browser/ui/webui/cast/cast_ui.h" | 105 #include "chrome/browser/ui/webui/cast/cast_ui.h" |
| (...skipping 488 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 593 #if defined(ENABLE_EXTENSIONS) | 594 #if defined(ENABLE_EXTENSIONS) |
| 594 if (url.host() == chrome::kChromeUIExtensionsFrameHost) | 595 if (url.host() == chrome::kChromeUIExtensionsFrameHost) |
| 595 return &NewWebUI<extensions::ExtensionsUI>; | 596 return &NewWebUI<extensions::ExtensionsUI>; |
| 596 #endif | 597 #endif |
| 597 #if defined(ENABLE_PLUGINS) | 598 #if defined(ENABLE_PLUGINS) |
| 598 if (url.host() == chrome::kChromeUIFlashHost) | 599 if (url.host() == chrome::kChromeUIFlashHost) |
| 599 return &NewWebUI<FlashUI>; | 600 return &NewWebUI<FlashUI>; |
| 600 if (url.host() == chrome::kChromeUIPluginsHost) | 601 if (url.host() == chrome::kChromeUIPluginsHost) |
| 601 return &NewWebUI<PluginsUI>; | 602 return &NewWebUI<PluginsUI>; |
| 602 #endif | 603 #endif |
| 603 #if defined(ENABLE_PRINT_PREVIEW) | 604 #if BUILDFLAG(ENABLE_PRINT_PREVIEW) |
| 604 if (url.host() == chrome::kChromeUIPrintHost && | 605 if (url.host() == chrome::kChromeUIPrintHost && |
| 605 !profile->GetPrefs()->GetBoolean(prefs::kPrintPreviewDisabled)) { | 606 !profile->GetPrefs()->GetBoolean(prefs::kPrintPreviewDisabled)) { |
| 606 return &NewWebUI<PrintPreviewUI>; | 607 return &NewWebUI<PrintPreviewUI>; |
| 607 } | 608 } |
| 608 #endif | 609 #endif |
| 609 #if BUILDFLAG(ENABLE_SERVICE_DISCOVERY) | 610 #if BUILDFLAG(ENABLE_SERVICE_DISCOVERY) |
| 610 if (url.host() == chrome::kChromeUIDevicesHost) { | 611 if (url.host() == chrome::kChromeUIDevicesHost) { |
| 611 return &NewWebUI<LocalDiscoveryUI>; | 612 return &NewWebUI<LocalDiscoveryUI>; |
| 612 } | 613 } |
| 613 #endif | 614 #endif |
| (...skipping 219 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 833 #endif | 834 #endif |
| 834 | 835 |
| 835 // Android doesn't use the plugins pages. | 836 // Android doesn't use the plugins pages. |
| 836 if (page_url.host() == chrome::kChromeUIPluginsHost) | 837 if (page_url.host() == chrome::kChromeUIPluginsHost) |
| 837 return PluginsUI::GetFaviconResourceBytes(scale_factor); | 838 return PluginsUI::GetFaviconResourceBytes(scale_factor); |
| 838 | 839 |
| 839 #endif | 840 #endif |
| 840 | 841 |
| 841 return NULL; | 842 return NULL; |
| 842 } | 843 } |
| OLD | NEW |