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

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

Issue 2021543002: [MD Feedback] Add basic chrome://feedback WebUI. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 6 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 94 matching lines...) Expand 10 before | Expand all | Expand 10 after
105 #include "chrome/browser/ui/webui/net_export_ui.h" 105 #include "chrome/browser/ui/webui/net_export_ui.h"
106 #include "chrome/browser/ui/webui/popular_sites_internals_ui.h" 106 #include "chrome/browser/ui/webui/popular_sites_internals_ui.h"
107 #include "chrome/browser/ui/webui/snippets_internals_ui.h" 107 #include "chrome/browser/ui/webui/snippets_internals_ui.h"
108 #else 108 #else
109 #include "chrome/browser/signin/easy_unlock_service.h" 109 #include "chrome/browser/signin/easy_unlock_service.h"
110 #include "chrome/browser/signin/easy_unlock_service_factory.h" 110 #include "chrome/browser/signin/easy_unlock_service_factory.h"
111 #include "chrome/browser/ui/webui/copresence_ui.h" 111 #include "chrome/browser/ui/webui/copresence_ui.h"
112 #include "chrome/browser/ui/webui/devtools_ui.h" 112 #include "chrome/browser/ui/webui/devtools_ui.h"
113 #include "chrome/browser/ui/webui/inspect_ui.h" 113 #include "chrome/browser/ui/webui/inspect_ui.h"
114 #include "chrome/browser/ui/webui/md_downloads/md_downloads_ui.h" 114 #include "chrome/browser/ui/webui/md_downloads/md_downloads_ui.h"
115 #include "chrome/browser/ui/webui/md_feedback/md_feedback_ui.h"
115 #include "chrome/browser/ui/webui/md_history_ui.h" 116 #include "chrome/browser/ui/webui/md_history_ui.h"
116 #include "chrome/browser/ui/webui/ntp/new_tab_ui.h" 117 #include "chrome/browser/ui/webui/ntp/new_tab_ui.h"
117 #include "chrome/browser/ui/webui/quota_internals/quota_internals_ui.h" 118 #include "chrome/browser/ui/webui/quota_internals/quota_internals_ui.h"
118 #include "chrome/browser/ui/webui/sync_file_system_internals/sync_file_system_in ternals_ui.h" 119 #include "chrome/browser/ui/webui/sync_file_system_internals/sync_file_system_in ternals_ui.h"
119 #include "chrome/browser/ui/webui/system_info_ui.h" 120 #include "chrome/browser/ui/webui/system_info_ui.h"
120 #include "chrome/browser/ui/webui/uber/uber_ui.h" 121 #include "chrome/browser/ui/webui/uber/uber_ui.h"
121 #endif 122 #endif
122 123
123 #if defined(OS_CHROMEOS) 124 #if defined(OS_CHROMEOS)
124 #include "base/sys_info.h" 125 #include "base/sys_info.h"
(...skipping 249 matching lines...) Expand 10 before | Expand all | Expand 10 after
374 * OS Specific #defines 375 * OS Specific #defines
375 ***************************************************************************/ 376 ***************************************************************************/
376 #if !defined(OS_ANDROID) 377 #if !defined(OS_ANDROID)
377 #if !defined(OS_CHROMEOS) 378 #if !defined(OS_CHROMEOS)
378 // AppLauncherPage is not needed on Android or ChromeOS. 379 // AppLauncherPage is not needed on Android or ChromeOS.
379 if (url.host() == chrome::kChromeUIAppLauncherPageHost && 380 if (url.host() == chrome::kChromeUIAppLauncherPageHost &&
380 profile && extensions::ExtensionSystem::Get(profile)-> 381 profile && extensions::ExtensionSystem::Get(profile)->
381 extension_service()) { 382 extension_service()) {
382 return &NewWebUI<AppLauncherPageUI>; 383 return &NewWebUI<AppLauncherPageUI>;
383 } 384 }
384 #endif 385 #endif // !defined(OS_CHROMEOS)
385 386
386 // Bookmarks are part of NTP on Android. 387 // Bookmarks are part of NTP on Android.
387 if (url.host() == chrome::kChromeUIBookmarksHost) 388 if (url.host() == chrome::kChromeUIBookmarksHost)
388 return &NewWebUI<BookmarksUI>; 389 return &NewWebUI<BookmarksUI>;
389 // Downloads list on Android uses the built-in download manager. 390 // Downloads list on Android uses the built-in download manager.
390 if (url.host() == chrome::kChromeUIDownloadsHost) 391 if (url.host() == chrome::kChromeUIDownloadsHost)
391 return &NewWebUI<MdDownloadsUI>; 392 return &NewWebUI<MdDownloadsUI>;
393 // Material Design feedback. Feedback is implemented separately in
394 // Android.
395 if (url.host() == chrome::kChromeUIFeedbackHost &&
396 ::switches::MdFeedbackEnabled()) {
397 return &NewWebUI<MdFeedbackUI>;
398 }
392 // Help is implemented with native UI elements on Android. 399 // Help is implemented with native UI elements on Android.
393 if (url.host() == chrome::kChromeUIHelpFrameHost) 400 if (url.host() == chrome::kChromeUIHelpFrameHost)
394 return &NewWebUI<HelpUI>; 401 return &NewWebUI<HelpUI>;
395 // Identity API is not available on Android. 402 // Identity API is not available on Android.
396 if (url.host() == chrome::kChromeUIIdentityInternalsHost) 403 if (url.host() == chrome::kChromeUIIdentityInternalsHost)
397 return &NewWebUI<IdentityInternalsUI>; 404 return &NewWebUI<IdentityInternalsUI>;
398 if (url.host() == chrome::kChromeUINewTabHost) 405 if (url.host() == chrome::kChromeUINewTabHost)
399 return &NewWebUI<NewTabUI>; 406 return &NewWebUI<NewTabUI>;
400 if (url.host() == chrome::kChromeUIMdSettingsHost) 407 if (url.host() == chrome::kChromeUIMdSettingsHost)
401 return &NewWebUI<settings::MdSettingsUI>; 408 return &NewWebUI<settings::MdSettingsUI>;
(...skipping 386 matching lines...) Expand 10 before | Expand all | Expand 10 after
788 #endif 795 #endif
789 796
790 // Android doesn't use the plugins pages. 797 // Android doesn't use the plugins pages.
791 if (page_url.host() == chrome::kChromeUIPluginsHost) 798 if (page_url.host() == chrome::kChromeUIPluginsHost)
792 return PluginsUI::GetFaviconResourceBytes(scale_factor); 799 return PluginsUI::GetFaviconResourceBytes(scale_factor);
793 800
794 #endif 801 #endif
795 802
796 return NULL; 803 return NULL;
797 } 804 }
OLDNEW
« no previous file with comments | « chrome/browser/resources/md_feedback/feedback.html ('k') | chrome/browser/ui/webui/md_feedback/md_feedback_ui.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698