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

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

Issue 285233007: Remove built-in pages that don't work on Android from suggest. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fixed builtin provider unit test Created 6 years, 7 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 | Annotate | Revision Log
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 "base/bind.h" 7 #include "base/bind.h"
8 #include "base/command_line.h" 8 #include "base/command_line.h"
9 #include "base/location.h" 9 #include "base/location.h"
10 #include "base/message_loop/message_loop_proxy.h" 10 #include "base/message_loop/message_loop_proxy.h"
(...skipping 26 matching lines...) Expand all
37 #include "chrome/browser/ui/webui/invalidations_ui.h" 37 #include "chrome/browser/ui/webui/invalidations_ui.h"
38 #include "chrome/browser/ui/webui/memory_internals/memory_internals_ui.h" 38 #include "chrome/browser/ui/webui/memory_internals/memory_internals_ui.h"
39 #include "chrome/browser/ui/webui/net_internals/net_internals_ui.h" 39 #include "chrome/browser/ui/webui/net_internals/net_internals_ui.h"
40 #include "chrome/browser/ui/webui/omnibox/omnibox_ui.h" 40 #include "chrome/browser/ui/webui/omnibox/omnibox_ui.h"
41 #include "chrome/browser/ui/webui/options/options_ui.h" 41 #include "chrome/browser/ui/webui/options/options_ui.h"
42 #include "chrome/browser/ui/webui/password_manager_internals/password_manager_in ternals_ui.h" 42 #include "chrome/browser/ui/webui/password_manager_internals/password_manager_in ternals_ui.h"
43 #include "chrome/browser/ui/webui/performance_monitor/performance_monitor_ui.h" 43 #include "chrome/browser/ui/webui/performance_monitor/performance_monitor_ui.h"
44 #include "chrome/browser/ui/webui/plugins_ui.h" 44 #include "chrome/browser/ui/webui/plugins_ui.h"
45 #include "chrome/browser/ui/webui/predictors/predictors_ui.h" 45 #include "chrome/browser/ui/webui/predictors/predictors_ui.h"
46 #include "chrome/browser/ui/webui/profiler_ui.h" 46 #include "chrome/browser/ui/webui/profiler_ui.h"
47 #include "chrome/browser/ui/webui/quota_internals/quota_internals_ui.h"
48 #include "chrome/browser/ui/webui/signin/inline_login_ui.h" 47 #include "chrome/browser/ui/webui/signin/inline_login_ui.h"
49 #include "chrome/browser/ui/webui/signin/profile_signin_confirmation_ui.h" 48 #include "chrome/browser/ui/webui/signin/profile_signin_confirmation_ui.h"
50 #include "chrome/browser/ui/webui/signin/user_manager_ui.h" 49 #include "chrome/browser/ui/webui/signin/user_manager_ui.h"
51 #include "chrome/browser/ui/webui/signin_internals_ui.h" 50 #include "chrome/browser/ui/webui/signin_internals_ui.h"
52 #include "chrome/browser/ui/webui/sync_internals_ui.h" 51 #include "chrome/browser/ui/webui/sync_internals_ui.h"
53 #include "chrome/browser/ui/webui/translate_internals/translate_internals_ui.h" 52 #include "chrome/browser/ui/webui/translate_internals/translate_internals_ui.h"
54 #include "chrome/browser/ui/webui/user_actions/user_actions_ui.h" 53 #include "chrome/browser/ui/webui/user_actions/user_actions_ui.h"
55 #include "chrome/browser/ui/webui/version_ui.h" 54 #include "chrome/browser/ui/webui/version_ui.h"
56 #include "chrome/common/chrome_switches.h" 55 #include "chrome/common/chrome_switches.h"
57 #include "chrome/common/extensions/extension_constants.h" 56 #include "chrome/common/extensions/extension_constants.h"
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
89 #endif 88 #endif
90 89
91 #if defined(ENABLE_FULL_PRINTING) 90 #if defined(ENABLE_FULL_PRINTING)
92 #include "chrome/browser/ui/webui/print_preview/print_preview_ui.h" 91 #include "chrome/browser/ui/webui/print_preview/print_preview_ui.h"
93 #endif 92 #endif
94 93
95 #if defined(OS_ANDROID) 94 #if defined(OS_ANDROID)
96 #include "chrome/browser/ui/webui/welcome_ui_android.h" 95 #include "chrome/browser/ui/webui/welcome_ui_android.h"
97 #else 96 #else
98 #include "chrome/browser/ui/webui/ntp/new_tab_ui.h" 97 #include "chrome/browser/ui/webui/ntp/new_tab_ui.h"
98 #include "chrome/browser/ui/webui/quota_internals/quota_internals_ui.h"
99 #include "chrome/browser/ui/webui/suggestions_internals/suggestions_internals_ui .h" 99 #include "chrome/browser/ui/webui/suggestions_internals/suggestions_internals_ui .h"
100 #include "chrome/browser/ui/webui/sync_file_system_internals/sync_file_system_in ternals_ui.h" 100 #include "chrome/browser/ui/webui/sync_file_system_internals/sync_file_system_in ternals_ui.h"
101 #include "chrome/browser/ui/webui/system_info_ui.h" 101 #include "chrome/browser/ui/webui/system_info_ui.h"
102 #include "chrome/browser/ui/webui/uber/uber_ui.h" 102 #include "chrome/browser/ui/webui/uber/uber_ui.h"
103 #endif 103 #endif
104 104
105 #if defined(OS_ANDROID) || defined(OS_IOS) 105 #if defined(OS_ANDROID) || defined(OS_IOS)
106 #include "chrome/browser/ui/webui/net_export_ui.h" 106 #include "chrome/browser/ui/webui/net_export_ui.h"
107 #endif 107 #endif
108 108
(...skipping 187 matching lines...) Expand 10 before | Expand all | Expand 10 after
296 return &NewWebUI<NewTabUI>; 296 return &NewWebUI<NewTabUI>;
297 #endif 297 #endif
298 if (url.host() == chrome::kChromeUIOmniboxHost) 298 if (url.host() == chrome::kChromeUIOmniboxHost)
299 return &NewWebUI<OmniboxUI>; 299 return &NewWebUI<OmniboxUI>;
300 if (url.host() == chrome::kChromeUIPasswordManagerInternalsHost) 300 if (url.host() == chrome::kChromeUIPasswordManagerInternalsHost)
301 return &NewWebUI<PasswordManagerInternalsUI>; 301 return &NewWebUI<PasswordManagerInternalsUI>;
302 if (url.host() == chrome::kChromeUIPredictorsHost) 302 if (url.host() == chrome::kChromeUIPredictorsHost)
303 return &NewWebUI<PredictorsUI>; 303 return &NewWebUI<PredictorsUI>;
304 if (url.host() == chrome::kChromeUIProfilerHost) 304 if (url.host() == chrome::kChromeUIProfilerHost)
305 return &NewWebUI<ProfilerUI>; 305 return &NewWebUI<ProfilerUI>;
306 if (url.host() == chrome::kChromeUIQuotaInternalsHost)
307 return &NewWebUI<QuotaInternalsUI>;
308 if (url.host() == chrome::kChromeUISignInInternalsHost) 306 if (url.host() == chrome::kChromeUISignInInternalsHost)
309 return &NewWebUI<SignInInternalsUI>; 307 return &NewWebUI<SignInInternalsUI>;
310 if (url.host() == chrome::kChromeUISyncInternalsHost) 308 if (url.host() == chrome::kChromeUISyncInternalsHost)
311 return &NewWebUI<SyncInternalsUI>; 309 return &NewWebUI<SyncInternalsUI>;
312 if (url.host() == chrome::kChromeUISyncResourcesHost) 310 if (url.host() == chrome::kChromeUISyncResourcesHost)
313 return &NewWebUI<WebDialogUI>; 311 return &NewWebUI<WebDialogUI>;
314 if (url.host() == chrome::kChromeUITranslateInternalsHost) 312 if (url.host() == chrome::kChromeUITranslateInternalsHost)
315 return &NewWebUI<TranslateInternalsUI>; 313 return &NewWebUI<TranslateInternalsUI>;
316 if (url.host() == chrome::kChromeUIUserActionsHost) 314 if (url.host() == chrome::kChromeUIUserActionsHost)
317 return &NewWebUI<UserActionsUI>; 315 return &NewWebUI<UserActionsUI>;
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after
362 // remote devtools on the host machine, and other elements (Shared Workers, 360 // remote devtools on the host machine, and other elements (Shared Workers,
363 // extensions, etc) aren't supported. 361 // extensions, etc) aren't supported.
364 if (url.host() == chrome::kChromeUIInspectHost) 362 if (url.host() == chrome::kChromeUIInspectHost)
365 return &NewWebUI<InspectUI>; 363 return &NewWebUI<InspectUI>;
366 // Performance monitoring page is not on Android for now. 364 // Performance monitoring page is not on Android for now.
367 if (url.host() == chrome::kChromeUIPerformanceMonitorHost) 365 if (url.host() == chrome::kChromeUIPerformanceMonitorHost)
368 return &NewWebUI<performance_monitor::PerformanceMonitorUI>; 366 return &NewWebUI<performance_monitor::PerformanceMonitorUI>;
369 // Android does not support plugins for now. 367 // Android does not support plugins for now.
370 if (url.host() == chrome::kChromeUIPluginsHost) 368 if (url.host() == chrome::kChromeUIPluginsHost)
371 return &NewWebUI<PluginsUI>; 369 return &NewWebUI<PluginsUI>;
370 if (url.host() == chrome::kChromeUIQuotaInternalsHost)
371 return &NewWebUI<QuotaInternalsUI>;
372 // Settings are implemented with native UI elements on Android. 372 // Settings are implemented with native UI elements on Android.
373 if (url.host() == chrome::kChromeUISettingsFrameHost) 373 if (url.host() == chrome::kChromeUISettingsFrameHost)
374 return &NewWebUI<options::OptionsUI>; 374 return &NewWebUI<options::OptionsUI>;
375 if (url.host() == chrome::kChromeUISuggestionsInternalsHost) 375 if (url.host() == chrome::kChromeUISuggestionsInternalsHost)
376 return &NewWebUI<SuggestionsInternalsUI>; 376 return &NewWebUI<SuggestionsInternalsUI>;
377 if (url.host() == chrome::kChromeUISyncFileSystemInternalsHost) 377 if (url.host() == chrome::kChromeUISyncFileSystemInternalsHost)
378 return &NewWebUI<SyncFileSystemInternalsUI>; 378 return &NewWebUI<SyncFileSystemInternalsUI>;
379 if (url.host() == chrome::kChromeUISystemInfoHost) 379 if (url.host() == chrome::kChromeUISystemInfoHost)
380 return &NewWebUI<SystemInfoUI>; 380 return &NewWebUI<SystemInfoUI>;
381 // Uber frame is not used on Android. 381 // Uber frame is not used on Android.
(...skipping 299 matching lines...) Expand 10 before | Expand all | Expand 10 after
681 #endif 681 #endif
682 682
683 // Android doesn't use the plugins pages. 683 // Android doesn't use the plugins pages.
684 if (page_url.host() == chrome::kChromeUIPluginsHost) 684 if (page_url.host() == chrome::kChromeUIPluginsHost)
685 return PluginsUI::GetFaviconResourceBytes(scale_factor); 685 return PluginsUI::GetFaviconResourceBytes(scale_factor);
686 686
687 #endif 687 #endif
688 688
689 return NULL; 689 return NULL;
690 } 690 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698