Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(85)

Side by Side Diff: chrome/browser/ui/webui/chrome_web_ui_controller_factory.cc

Issue 2743323005: MD Settings: enhance restarting Chrome + interacting w/ session restore (Closed)
Patch Set: merge Created 3 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 425 matching lines...) Expand 10 before | Expand all | Expand 10 after
436 base::FeatureList::IsEnabled(features::kMaterialDesignExtensions)) { 436 base::FeatureList::IsEnabled(features::kMaterialDesignExtensions)) {
437 return &NewWebUI<extensions::ExtensionsUI>; 437 return &NewWebUI<extensions::ExtensionsUI>;
438 } 438 }
439 // Material Design history is on its own host, rather than on an Uber page. 439 // Material Design history is on its own host, rather than on an Uber page.
440 if (base::FeatureList::IsEnabled(features::kMaterialDesignHistory) && 440 if (base::FeatureList::IsEnabled(features::kMaterialDesignHistory) &&
441 url.host_piece() == content::kChromeUIHistoryHost) { 441 url.host_piece() == content::kChromeUIHistoryHost) {
442 return &NewWebUI<MdHistoryUI>; 442 return &NewWebUI<MdHistoryUI>;
443 } 443 }
444 // Material Design Settings gets its own host, if enabled. 444 // Material Design Settings gets its own host, if enabled.
445 if (base::FeatureList::IsEnabled(features::kMaterialDesignSettings) && 445 if (base::FeatureList::IsEnabled(features::kMaterialDesignSettings) &&
446 url.host_piece() == chrome::kChromeUISettingsHost) { 446 url.host_piece() == content::kChromeUISettingsHost) {
447 return &NewWebUI<settings::MdSettingsUI>; 447 return &NewWebUI<settings::MdSettingsUI>;
448 } 448 }
449 // Settings are implemented with native UI elements on Android. 449 // Settings are implemented with native UI elements on Android.
450 // Handle chrome://settings if settings in a window is enabled. 450 // Handle chrome://settings if settings in a window is enabled.
451 if (url.host_piece() == chrome::kChromeUISettingsFrameHost || 451 if (url.host_piece() == chrome::kChromeUISettingsFrameHost ||
452 (url.host_piece() == chrome::kChromeUISettingsHost && 452 (url.host_piece() == content::kChromeUISettingsHost &&
453 ::switches::SettingsWindowEnabled())) { 453 ::switches::SettingsWindowEnabled())) {
454 return &NewWebUI<options::OptionsUI>; 454 return &NewWebUI<options::OptionsUI>;
455 } 455 }
456 if (url.host_piece() == chrome::kChromeUISyncFileSystemInternalsHost) 456 if (url.host_piece() == chrome::kChromeUISyncFileSystemInternalsHost)
457 return &NewWebUI<SyncFileSystemInternalsUI>; 457 return &NewWebUI<SyncFileSystemInternalsUI>;
458 if (url.host_piece() == chrome::kChromeUISystemInfoHost) 458 if (url.host_piece() == chrome::kChromeUISystemInfoHost)
459 return &NewWebUI<SystemInfoUI>; 459 return &NewWebUI<SystemInfoUI>;
460 // Uber frame is not used on Android. 460 // Uber frame is not used on Android.
461 if (url.host_piece() == chrome::kChromeUIUberFrameHost) 461 if (url.host_piece() == chrome::kChromeUIUberFrameHost)
462 return &NewWebUI<UberFrameUI>; 462 return &NewWebUI<UberFrameUI>;
(...skipping 346 matching lines...) Expand 10 before | Expand all | Expand 10 after
809 809
810 // Flash is not available on android. 810 // Flash is not available on android.
811 if (page_url.host_piece() == chrome::kChromeUIFlashHost) 811 if (page_url.host_piece() == chrome::kChromeUIFlashHost)
812 return FlashUI::GetFaviconResourceBytes(scale_factor); 812 return FlashUI::GetFaviconResourceBytes(scale_factor);
813 813
814 // Android uses the native download manager. 814 // Android uses the native download manager.
815 if (page_url.host_piece() == chrome::kChromeUIDownloadsHost) 815 if (page_url.host_piece() == chrome::kChromeUIDownloadsHost)
816 return MdDownloadsUI::GetFaviconResourceBytes(scale_factor); 816 return MdDownloadsUI::GetFaviconResourceBytes(scale_factor);
817 817
818 // Android doesn't use the Options/Settings pages. 818 // Android doesn't use the Options/Settings pages.
819 if (page_url.host_piece() == chrome::kChromeUISettingsHost || 819 if (page_url.host_piece() == content::kChromeUISettingsHost ||
820 page_url.host_piece() == chrome::kChromeUISettingsFrameHost || 820 page_url.host_piece() == chrome::kChromeUISettingsFrameHost ||
821 page_url.host_piece() == chrome::kChromeUIMdSettingsHost) 821 page_url.host_piece() == chrome::kChromeUIMdSettingsHost)
822 return settings_utils::GetFaviconResourceBytes(scale_factor); 822 return settings_utils::GetFaviconResourceBytes(scale_factor);
823 823
824 #if BUILDFLAG(ENABLE_EXTENSIONS) 824 #if BUILDFLAG(ENABLE_EXTENSIONS)
825 if (page_url.host_piece() == chrome::kChromeUIExtensionsHost || 825 if (page_url.host_piece() == chrome::kChromeUIExtensionsHost ||
826 page_url.host_piece() == chrome::kChromeUIExtensionsFrameHost) 826 page_url.host_piece() == chrome::kChromeUIExtensionsFrameHost)
827 return extensions::ExtensionsUI::GetFaviconResourceBytes(scale_factor); 827 return extensions::ExtensionsUI::GetFaviconResourceBytes(scale_factor);
828 #endif // BUILDFLAG(ENABLE_EXTENSIONS) 828 #endif // BUILDFLAG(ENABLE_EXTENSIONS)
829 #endif // !defined(OS_ANDROID) 829 #endif // !defined(OS_ANDROID)
830 830
831 return NULL; 831 return NULL;
832 } 832 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698