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

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

Issue 2751653004: MD History: re-use history host constant from content/ instead of duplicating to chrome/ (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
« no previous file with comments | « chrome/browser/ui/browser_navigator.cc ('k') | chrome/browser/ui/webui/md_history_ui.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 62 matching lines...) Expand 10 before | Expand all | Expand 10 after
73 #include "components/dom_distiller/webui/dom_distiller_ui.h" 73 #include "components/dom_distiller/webui/dom_distiller_ui.h"
74 #include "components/favicon/core/favicon_service.h" 74 #include "components/favicon/core/favicon_service.h"
75 #include "components/favicon_base/favicon_util.h" 75 #include "components/favicon_base/favicon_util.h"
76 #include "components/favicon_base/select_favicon_frames.h" 76 #include "components/favicon_base/select_favicon_frames.h"
77 #include "components/history/core/browser/history_types.h" 77 #include "components/history/core/browser/history_types.h"
78 #include "components/prefs/pref_service.h" 78 #include "components/prefs/pref_service.h"
79 #include "components/signin/core/common/profile_management_switches.h" 79 #include "components/signin/core/common/profile_management_switches.h"
80 #include "content/public/browser/web_contents.h" 80 #include "content/public/browser/web_contents.h"
81 #include "content/public/browser/web_ui.h" 81 #include "content/public/browser/web_ui.h"
82 #include "content/public/common/content_client.h" 82 #include "content/public/common/content_client.h"
83 #include "content/public/common/url_constants.h"
83 #include "content/public/common/url_utils.h" 84 #include "content/public/common/url_utils.h"
84 #include "device/vr/features.h" 85 #include "device/vr/features.h"
85 #include "extensions/features/features.h" 86 #include "extensions/features/features.h"
86 #include "media/media_features.h" 87 #include "media/media_features.h"
87 #include "ppapi/features/features.h" 88 #include "ppapi/features/features.h"
88 #include "printing/features/features.h" 89 #include "printing/features/features.h"
89 #include "ui/gfx/favicon_size.h" 90 #include "ui/gfx/favicon_size.h"
90 #include "ui/web_dialogs/web_dialog_ui.h" 91 #include "ui/web_dialogs/web_dialog_ui.h"
91 #include "url/gurl.h" 92 #include "url/gurl.h"
92 93
(...skipping 337 matching lines...) Expand 10 before | Expand all | Expand 10 after
430 if (url.host_piece() == chrome::kChromeUIMdSettingsHost) 431 if (url.host_piece() == chrome::kChromeUIMdSettingsHost)
431 return &NewWebUI<settings::MdSettingsUI>; 432 return &NewWebUI<settings::MdSettingsUI>;
432 // If the material design extensions page is enabled, it gets its own host. 433 // If the material design extensions page is enabled, it gets its own host.
433 // Otherwise, it's handled by the uber settings page. 434 // Otherwise, it's handled by the uber settings page.
434 if (url.host_piece() == chrome::kChromeUIExtensionsHost && 435 if (url.host_piece() == chrome::kChromeUIExtensionsHost &&
435 base::FeatureList::IsEnabled(features::kMaterialDesignExtensions)) { 436 base::FeatureList::IsEnabled(features::kMaterialDesignExtensions)) {
436 return &NewWebUI<extensions::ExtensionsUI>; 437 return &NewWebUI<extensions::ExtensionsUI>;
437 } 438 }
438 // 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.
439 if (base::FeatureList::IsEnabled(features::kMaterialDesignHistory) && 440 if (base::FeatureList::IsEnabled(features::kMaterialDesignHistory) &&
440 url.host_piece() == chrome::kChromeUIHistoryHost) { 441 url.host_piece() == content::kChromeUIHistoryHost) {
441 return &NewWebUI<MdHistoryUI>; 442 return &NewWebUI<MdHistoryUI>;
442 } 443 }
443 // Material Design Settings gets its own host, if enabled. 444 // Material Design Settings gets its own host, if enabled.
444 if (base::FeatureList::IsEnabled(features::kMaterialDesignSettings) && 445 if (base::FeatureList::IsEnabled(features::kMaterialDesignSettings) &&
445 url.host_piece() == chrome::kChromeUISettingsHost) { 446 url.host_piece() == chrome::kChromeUISettingsHost) {
446 return &NewWebUI<settings::MdSettingsUI>; 447 return &NewWebUI<settings::MdSettingsUI>;
447 } 448 }
448 // Settings are implemented with native UI elements on Android. 449 // Settings are implemented with native UI elements on Android.
449 // Handle chrome://settings if settings in a window is enabled. 450 // Handle chrome://settings if settings in a window is enabled.
450 if (url.host_piece() == chrome::kChromeUISettingsFrameHost || 451 if (url.host_piece() == chrome::kChromeUISettingsFrameHost ||
(...skipping 338 matching lines...) Expand 10 before | Expand all | Expand 10 after
789 if (page_url.host_piece() == chrome::kChromeUIConflictsHost) 790 if (page_url.host_piece() == chrome::kChromeUIConflictsHost)
790 return ConflictsUI::GetFaviconResourceBytes(scale_factor); 791 return ConflictsUI::GetFaviconResourceBytes(scale_factor);
791 #endif 792 #endif
792 793
793 if (page_url.host_piece() == chrome::kChromeUICrashesHost) 794 if (page_url.host_piece() == chrome::kChromeUICrashesHost)
794 return CrashesUI::GetFaviconResourceBytes(scale_factor); 795 return CrashesUI::GetFaviconResourceBytes(scale_factor);
795 796
796 if (page_url.host_piece() == chrome::kChromeUIFlagsHost) 797 if (page_url.host_piece() == chrome::kChromeUIFlagsHost)
797 return FlagsUI::GetFaviconResourceBytes(scale_factor); 798 return FlagsUI::GetFaviconResourceBytes(scale_factor);
798 799
799 if (page_url.host_piece() == chrome::kChromeUIHistoryHost) 800 if (page_url.host_piece() == content::kChromeUIHistoryHost)
800 return HistoryUI::GetFaviconResourceBytes(scale_factor); 801 return HistoryUI::GetFaviconResourceBytes(scale_factor);
801 802
802 #if !defined(OS_ANDROID) 803 #if !defined(OS_ANDROID)
803 #if !defined(OS_CHROMEOS) 804 #if !defined(OS_CHROMEOS)
804 // The Apps launcher page is not available on android or ChromeOS. 805 // The Apps launcher page is not available on android or ChromeOS.
805 if (page_url.host_piece() == chrome::kChromeUIAppLauncherPageHost) 806 if (page_url.host_piece() == chrome::kChromeUIAppLauncherPageHost)
806 return AppLauncherPageUI::GetFaviconResourceBytes(scale_factor); 807 return AppLauncherPageUI::GetFaviconResourceBytes(scale_factor);
807 #endif // !defined(OS_CHROMEOS) 808 #endif // !defined(OS_CHROMEOS)
808 809
809 // Flash is not available on android. 810 // Flash is not available on android.
(...skipping 12 matching lines...) Expand all
822 823
823 #if BUILDFLAG(ENABLE_EXTENSIONS) 824 #if BUILDFLAG(ENABLE_EXTENSIONS)
824 if (page_url.host_piece() == chrome::kChromeUIExtensionsHost || 825 if (page_url.host_piece() == chrome::kChromeUIExtensionsHost ||
825 page_url.host_piece() == chrome::kChromeUIExtensionsFrameHost) 826 page_url.host_piece() == chrome::kChromeUIExtensionsFrameHost)
826 return extensions::ExtensionsUI::GetFaviconResourceBytes(scale_factor); 827 return extensions::ExtensionsUI::GetFaviconResourceBytes(scale_factor);
827 #endif // BUILDFLAG(ENABLE_EXTENSIONS) 828 #endif // BUILDFLAG(ENABLE_EXTENSIONS)
828 #endif // !defined(OS_ANDROID) 829 #endif // !defined(OS_ANDROID)
829 830
830 return NULL; 831 return NULL;
831 } 832 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/browser_navigator.cc ('k') | chrome/browser/ui/webui/md_history_ui.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698