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

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

Issue 2759333002: Move chrome-specific SerializedNavigation code to chrome/. (Closed)
Patch Set: Fix Android 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"
84 #include "content/public/common/url_utils.h" 83 #include "content/public/common/url_utils.h"
85 #include "device/vr/features.h" 84 #include "device/vr/features.h"
86 #include "extensions/features/features.h" 85 #include "extensions/features/features.h"
87 #include "media/media_features.h" 86 #include "media/media_features.h"
88 #include "ppapi/features/features.h" 87 #include "ppapi/features/features.h"
89 #include "printing/features/features.h" 88 #include "printing/features/features.h"
90 #include "ui/gfx/favicon_size.h" 89 #include "ui/gfx/favicon_size.h"
91 #include "ui/web_dialogs/web_dialog_ui.h" 90 #include "ui/web_dialogs/web_dialog_ui.h"
92 #include "url/gurl.h" 91 #include "url/gurl.h"
93 92
(...skipping 337 matching lines...) Expand 10 before | Expand all | Expand 10 after
431 if (url.host_piece() == chrome::kChromeUIMdSettingsHost) 430 if (url.host_piece() == chrome::kChromeUIMdSettingsHost)
432 return &NewWebUI<settings::MdSettingsUI>; 431 return &NewWebUI<settings::MdSettingsUI>;
433 // If the material design extensions page is enabled, it gets its own host. 432 // If the material design extensions page is enabled, it gets its own host.
434 // Otherwise, it's handled by the uber settings page. 433 // Otherwise, it's handled by the uber settings page.
435 if (url.host_piece() == chrome::kChromeUIExtensionsHost && 434 if (url.host_piece() == chrome::kChromeUIExtensionsHost &&
436 base::FeatureList::IsEnabled(features::kMaterialDesignExtensions)) { 435 base::FeatureList::IsEnabled(features::kMaterialDesignExtensions)) {
437 return &NewWebUI<extensions::ExtensionsUI>; 436 return &NewWebUI<extensions::ExtensionsUI>;
438 } 437 }
439 // Material Design history is on its own host, rather than on an Uber page. 438 // Material Design history is on its own host, rather than on an Uber page.
440 if (base::FeatureList::IsEnabled(features::kMaterialDesignHistory) && 439 if (base::FeatureList::IsEnabled(features::kMaterialDesignHistory) &&
441 url.host_piece() == content::kChromeUIHistoryHost) { 440 url.host_piece() == chrome::kChromeUIHistoryHost) {
442 return &NewWebUI<MdHistoryUI>; 441 return &NewWebUI<MdHistoryUI>;
443 } 442 }
444 // Material Design Settings gets its own host, if enabled. 443 // Material Design Settings gets its own host, if enabled.
445 if (base::FeatureList::IsEnabled(features::kMaterialDesignSettings) && 444 if (base::FeatureList::IsEnabled(features::kMaterialDesignSettings) &&
446 url.host_piece() == chrome::kChromeUISettingsHost) { 445 url.host_piece() == chrome::kChromeUISettingsHost) {
447 return &NewWebUI<settings::MdSettingsUI>; 446 return &NewWebUI<settings::MdSettingsUI>;
448 } 447 }
449 // Settings are implemented with native UI elements on Android. 448 // Settings are implemented with native UI elements on Android.
450 // Handle chrome://settings if settings in a window is enabled. 449 // Handle chrome://settings if settings in a window is enabled.
451 if (url.host_piece() == chrome::kChromeUISettingsFrameHost || 450 if (url.host_piece() == chrome::kChromeUISettingsFrameHost ||
(...skipping 338 matching lines...) Expand 10 before | Expand all | Expand 10 after
790 if (page_url.host_piece() == chrome::kChromeUIConflictsHost) 789 if (page_url.host_piece() == chrome::kChromeUIConflictsHost)
791 return ConflictsUI::GetFaviconResourceBytes(scale_factor); 790 return ConflictsUI::GetFaviconResourceBytes(scale_factor);
792 #endif 791 #endif
793 792
794 if (page_url.host_piece() == chrome::kChromeUICrashesHost) 793 if (page_url.host_piece() == chrome::kChromeUICrashesHost)
795 return CrashesUI::GetFaviconResourceBytes(scale_factor); 794 return CrashesUI::GetFaviconResourceBytes(scale_factor);
796 795
797 if (page_url.host_piece() == chrome::kChromeUIFlagsHost) 796 if (page_url.host_piece() == chrome::kChromeUIFlagsHost)
798 return FlagsUI::GetFaviconResourceBytes(scale_factor); 797 return FlagsUI::GetFaviconResourceBytes(scale_factor);
799 798
800 if (page_url.host_piece() == content::kChromeUIHistoryHost) 799 if (page_url.host_piece() == chrome::kChromeUIHistoryHost)
801 return HistoryUI::GetFaviconResourceBytes(scale_factor); 800 return HistoryUI::GetFaviconResourceBytes(scale_factor);
802 801
803 #if !defined(OS_ANDROID) 802 #if !defined(OS_ANDROID)
804 #if !defined(OS_CHROMEOS) 803 #if !defined(OS_CHROMEOS)
805 // The Apps launcher page is not available on android or ChromeOS. 804 // The Apps launcher page is not available on android or ChromeOS.
806 if (page_url.host_piece() == chrome::kChromeUIAppLauncherPageHost) 805 if (page_url.host_piece() == chrome::kChromeUIAppLauncherPageHost)
807 return AppLauncherPageUI::GetFaviconResourceBytes(scale_factor); 806 return AppLauncherPageUI::GetFaviconResourceBytes(scale_factor);
808 #endif // !defined(OS_CHROMEOS) 807 #endif // !defined(OS_CHROMEOS)
809 808
810 // Flash is not available on android. 809 // Flash is not available on android.
(...skipping 12 matching lines...) Expand all
823 822
824 #if BUILDFLAG(ENABLE_EXTENSIONS) 823 #if BUILDFLAG(ENABLE_EXTENSIONS)
825 if (page_url.host_piece() == chrome::kChromeUIExtensionsHost || 824 if (page_url.host_piece() == chrome::kChromeUIExtensionsHost ||
826 page_url.host_piece() == chrome::kChromeUIExtensionsFrameHost) 825 page_url.host_piece() == chrome::kChromeUIExtensionsFrameHost)
827 return extensions::ExtensionsUI::GetFaviconResourceBytes(scale_factor); 826 return extensions::ExtensionsUI::GetFaviconResourceBytes(scale_factor);
828 #endif // BUILDFLAG(ENABLE_EXTENSIONS) 827 #endif // BUILDFLAG(ENABLE_EXTENSIONS)
829 #endif // !defined(OS_ANDROID) 828 #endif // !defined(OS_ANDROID)
830 829
831 return NULL; 830 return NULL;
832 } 831 }
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