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" |
11 #include "base/location.h" | 11 #include "base/location.h" |
12 #include "base/message_loop/message_loop_proxy.h" | 12 #include "base/message_loop/message_loop_proxy.h" |
13 #include "base/prefs/pref_service.h" | 13 #include "base/prefs/pref_service.h" |
14 #include "chrome/browser/about_flags.h" | 14 #include "chrome/browser/about_flags.h" |
15 #include "chrome/browser/bookmarks/enhanced_bookmarks_features.h" | 15 #include "chrome/browser/bookmarks/enhanced_bookmarks_features.h" |
16 #include "chrome/browser/dom_distiller/dom_distiller_service_factory.h" | 16 #include "chrome/browser/dom_distiller/dom_distiller_service_factory.h" |
17 #include "chrome/browser/favicon/favicon_service.h" | 17 #include "chrome/browser/favicon/favicon_service.h" |
18 #include "chrome/browser/profiles/profile.h" | 18 #include "chrome/browser/profiles/profile.h" |
19 #include "chrome/browser/profiles/profile_manager.h" | 19 #include "chrome/browser/profiles/profile_manager.h" |
20 #include "chrome/browser/ui/webui/about_ui.h" | 20 #include "chrome/browser/ui/webui/about_ui.h" |
21 #include "chrome/browser/ui/webui/app_launcher_page_ui.h" | 21 #include "chrome/browser/ui/webui/app_launcher_page_ui.h" |
22 #include "chrome/browser/ui/webui/bookmarks_ui.h" | 22 #include "chrome/browser/ui/webui/bookmarks_ui.h" |
23 #include "chrome/browser/ui/webui/components_ui.h" | 23 #include "chrome/browser/ui/webui/components_ui.h" |
24 #include "chrome/browser/ui/webui/constrained_web_dialog_ui.h" | 24 #include "chrome/browser/ui/webui/constrained_web_dialog_ui.h" |
| 25 #include "chrome/browser/ui/webui/copresence_ui.h" |
25 #include "chrome/browser/ui/webui/crashes_ui.h" | 26 #include "chrome/browser/ui/webui/crashes_ui.h" |
26 #include "chrome/browser/ui/webui/domain_reliability_internals_ui.h" | 27 #include "chrome/browser/ui/webui/domain_reliability_internals_ui.h" |
27 #include "chrome/browser/ui/webui/downloads_ui.h" | 28 #include "chrome/browser/ui/webui/downloads_ui.h" |
28 #include "chrome/browser/ui/webui/flags_ui.h" | 29 #include "chrome/browser/ui/webui/flags_ui.h" |
29 #include "chrome/browser/ui/webui/flash_ui.h" | 30 #include "chrome/browser/ui/webui/flash_ui.h" |
30 #include "chrome/browser/ui/webui/gcm_internals_ui.h" | 31 #include "chrome/browser/ui/webui/gcm_internals_ui.h" |
31 #include "chrome/browser/ui/webui/help/help_ui.h" | 32 #include "chrome/browser/ui/webui/help/help_ui.h" |
32 #include "chrome/browser/ui/webui/history_ui.h" | 33 #include "chrome/browser/ui/webui/history_ui.h" |
33 #include "chrome/browser/ui/webui/identity_internals_ui.h" | 34 #include "chrome/browser/ui/webui/identity_internals_ui.h" |
34 #include "chrome/browser/ui/webui/instant_ui.h" | 35 #include "chrome/browser/ui/webui/instant_ui.h" |
(...skipping 409 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
444 return &NewWebUI<chromeos::SlowTraceController>; | 445 return &NewWebUI<chromeos::SlowTraceController>; |
445 if (url.host() == chrome::kChromeUINetworkHost) | 446 if (url.host() == chrome::kChromeUINetworkHost) |
446 return &NewWebUI<chromeos::NetworkUI>; | 447 return &NewWebUI<chromeos::NetworkUI>; |
447 if (url.host() == chrome::kChromeUIPowerHost) | 448 if (url.host() == chrome::kChromeUIPowerHost) |
448 return &NewWebUI<chromeos::PowerUI>; | 449 return &NewWebUI<chromeos::PowerUI>; |
449 #endif // defined(OS_CHROMEOS) | 450 #endif // defined(OS_CHROMEOS) |
450 #if defined(OS_ANDROID) || defined(OS_IOS) | 451 #if defined(OS_ANDROID) || defined(OS_IOS) |
451 if (url.host() == chrome::kChromeUINetExportHost) | 452 if (url.host() == chrome::kChromeUINetExportHost) |
452 return &NewWebUI<NetExportUI>; | 453 return &NewWebUI<NetExportUI>; |
453 #else | 454 #else |
| 455 if (url.host() == chrome::kChromeUICopresenceHost) |
| 456 return &NewWebUI<CopresenceUI>; |
454 if (url.host() == chrome::kChromeUIChromeSigninHost) | 457 if (url.host() == chrome::kChromeUIChromeSigninHost) |
455 return &NewWebUI<InlineLoginUI>; | 458 return &NewWebUI<InlineLoginUI>; |
456 if (url.SchemeIs(content::kChromeDevToolsScheme)) | 459 if (url.SchemeIs(content::kChromeDevToolsScheme)) |
457 return &NewWebUI<DevToolsUI>; | 460 return &NewWebUI<DevToolsUI>; |
458 if (url.host() == chrome::kChromeUIWebRTCDeviceProviderHost) | 461 if (url.host() == chrome::kChromeUIWebRTCDeviceProviderHost) |
459 return &NewWebUI<WebRTCDeviceProvider::WebUI>; | 462 return &NewWebUI<WebRTCDeviceProvider::WebUI>; |
460 | 463 |
461 // chrome://inspect isn't supported on Android nor iOS. Page debugging is | 464 // chrome://inspect isn't supported on Android nor iOS. Page debugging is |
462 // handled by a remote devtools on the host machine, and other elements, i.e. | 465 // handled by a remote devtools on the host machine, and other elements, i.e. |
463 // extensions aren't supported. | 466 // extensions aren't supported. |
(...skipping 259 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
723 #endif | 726 #endif |
724 | 727 |
725 // Android doesn't use the plugins pages. | 728 // Android doesn't use the plugins pages. |
726 if (page_url.host() == chrome::kChromeUIPluginsHost) | 729 if (page_url.host() == chrome::kChromeUIPluginsHost) |
727 return PluginsUI::GetFaviconResourceBytes(scale_factor); | 730 return PluginsUI::GetFaviconResourceBytes(scale_factor); |
728 | 731 |
729 #endif | 732 #endif |
730 | 733 |
731 return NULL; | 734 return NULL; |
732 } | 735 } |
OLD | NEW |