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

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

Issue 1887403002: Create a WebUIController for chrome://suggestions (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: . Created 4 years, 8 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
11 #include "base/bind.h" 11 #include "base/bind.h"
12 #include "base/location.h" 12 #include "base/location.h"
13 #include "base/thread_task_runner_handle.h" 13 #include "base/thread_task_runner_handle.h"
14 #include "build/build_config.h" 14 #include "build/build_config.h"
15 #include "chrome/browser/about_flags.h" 15 #include "chrome/browser/about_flags.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/engagement/site_engagement_service.h" 17 #include "chrome/browser/engagement/site_engagement_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/search/suggestions/suggestions_ui.h"
20 #include "chrome/browser/ui/webui/about_ui.h" 21 #include "chrome/browser/ui/webui/about_ui.h"
21 #include "chrome/browser/ui/webui/bookmarks_ui.h" 22 #include "chrome/browser/ui/webui/bookmarks_ui.h"
22 #include "chrome/browser/ui/webui/components_ui.h" 23 #include "chrome/browser/ui/webui/components_ui.h"
23 #include "chrome/browser/ui/webui/constrained_web_dialog_ui.h" 24 #include "chrome/browser/ui/webui/constrained_web_dialog_ui.h"
24 #include "chrome/browser/ui/webui/crashes_ui.h" 25 #include "chrome/browser/ui/webui/crashes_ui.h"
25 #include "chrome/browser/ui/webui/device_log_ui.h" 26 #include "chrome/browser/ui/webui/device_log_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/engagement/site_engagement_ui.h" 28 #include "chrome/browser/ui/webui/engagement/site_engagement_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"
(...skipping 308 matching lines...) Expand 10 before | Expand all | Expand 10 after
338 if (url.host() == chrome::kChromeUIOmniboxHost) 339 if (url.host() == chrome::kChromeUIOmniboxHost)
339 return &NewWebUI<OmniboxUI>; 340 return &NewWebUI<OmniboxUI>;
340 if (url.host() == chrome::kChromeUIPasswordManagerInternalsHost) 341 if (url.host() == chrome::kChromeUIPasswordManagerInternalsHost)
341 return &NewWebUI<PasswordManagerInternalsUI>; 342 return &NewWebUI<PasswordManagerInternalsUI>;
342 if (url.host() == chrome::kChromeUIPredictorsHost) 343 if (url.host() == chrome::kChromeUIPredictorsHost)
343 return &NewWebUI<PredictorsUI>; 344 return &NewWebUI<PredictorsUI>;
344 if (url.host() == chrome::kChromeUIProfilerHost) 345 if (url.host() == chrome::kChromeUIProfilerHost)
345 return &NewWebUI<ProfilerUI>; 346 return &NewWebUI<ProfilerUI>;
346 if (url.host() == chrome::kChromeUISignInInternalsHost) 347 if (url.host() == chrome::kChromeUISignInInternalsHost)
347 return &NewWebUI<SignInInternalsUI>; 348 return &NewWebUI<SignInInternalsUI>;
349 if (url.host() == chrome::kChromeUISuggestionsHost)
350 return &NewWebUI<suggestions::SuggestionsUI>;
348 if (url.host() == chrome::kChromeUISupervisedUserInternalsHost) 351 if (url.host() == chrome::kChromeUISupervisedUserInternalsHost)
349 return &NewWebUI<SupervisedUserInternalsUI>; 352 return &NewWebUI<SupervisedUserInternalsUI>;
350 if (url.host() == chrome::kChromeUISupervisedUserPassphrasePageHost) 353 if (url.host() == chrome::kChromeUISupervisedUserPassphrasePageHost)
351 return &NewWebUI<ConstrainedWebDialogUI>; 354 return &NewWebUI<ConstrainedWebDialogUI>;
352 if (url.host() == chrome::kChromeUISyncInternalsHost) 355 if (url.host() == chrome::kChromeUISyncInternalsHost)
353 return &NewWebUI<SyncInternalsUI>; 356 return &NewWebUI<SyncInternalsUI>;
354 if (url.host() == chrome::kChromeUISyncResourcesHost) 357 if (url.host() == chrome::kChromeUISyncResourcesHost)
355 return &NewWebUI<WebDialogUI>; 358 return &NewWebUI<WebDialogUI>;
356 if (url.host() == chrome::kChromeUITranslateInternalsHost) 359 if (url.host() == chrome::kChromeUITranslateInternalsHost)
357 return &NewWebUI<TranslateInternalsUI>; 360 return &NewWebUI<TranslateInternalsUI>;
(...skipping 409 matching lines...) Expand 10 before | Expand all | Expand 10 after
767 #endif 770 #endif
768 771
769 // Android doesn't use the plugins pages. 772 // Android doesn't use the plugins pages.
770 if (page_url.host() == chrome::kChromeUIPluginsHost) 773 if (page_url.host() == chrome::kChromeUIPluginsHost)
771 return PluginsUI::GetFaviconResourceBytes(scale_factor); 774 return PluginsUI::GetFaviconResourceBytes(scale_factor);
772 775
773 #endif 776 #endif
774 777
775 return NULL; 778 return NULL;
776 } 779 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698