Chromium Code Reviews| OLD | NEW |
|---|---|
| 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 <vector> | 7 #include <vector> |
| 8 | 8 |
| 9 #include "base/bind.h" | 9 #include "base/bind.h" |
| 10 #include "base/command_line.h" | 10 #include "base/command_line.h" |
| (...skipping 18 matching lines...) Expand all Loading... | |
| 29 #include "chrome/browser/ui/webui/flags_ui.h" | 29 #include "chrome/browser/ui/webui/flags_ui.h" |
| 30 #include "chrome/browser/ui/webui/flash_ui.h" | 30 #include "chrome/browser/ui/webui/flash_ui.h" |
| 31 #include "chrome/browser/ui/webui/gcm_internals_ui.h" | 31 #include "chrome/browser/ui/webui/gcm_internals_ui.h" |
| 32 #include "chrome/browser/ui/webui/help/help_ui.h" | 32 #include "chrome/browser/ui/webui/help/help_ui.h" |
| 33 #include "chrome/browser/ui/webui/history_ui.h" | 33 #include "chrome/browser/ui/webui/history_ui.h" |
| 34 #include "chrome/browser/ui/webui/identity_internals_ui.h" | 34 #include "chrome/browser/ui/webui/identity_internals_ui.h" |
| 35 #include "chrome/browser/ui/webui/instant_ui.h" | 35 #include "chrome/browser/ui/webui/instant_ui.h" |
| 36 #include "chrome/browser/ui/webui/interstitials/interstitial_ui.h" | 36 #include "chrome/browser/ui/webui/interstitials/interstitial_ui.h" |
| 37 #include "chrome/browser/ui/webui/invalidations_ui.h" | 37 #include "chrome/browser/ui/webui/invalidations_ui.h" |
| 38 #include "chrome/browser/ui/webui/local_state/local_state_ui.h" | 38 #include "chrome/browser/ui/webui/local_state/local_state_ui.h" |
| 39 #include "chrome/browser/ui/webui/md_settings_ui.h" | |
| 39 #include "chrome/browser/ui/webui/memory_internals/memory_internals_ui.h" | 40 #include "chrome/browser/ui/webui/memory_internals/memory_internals_ui.h" |
| 40 #include "chrome/browser/ui/webui/net_internals/net_internals_ui.h" | 41 #include "chrome/browser/ui/webui/net_internals/net_internals_ui.h" |
| 41 #include "chrome/browser/ui/webui/omnibox/omnibox_ui.h" | 42 #include "chrome/browser/ui/webui/omnibox/omnibox_ui.h" |
| 42 #include "chrome/browser/ui/webui/options/options_ui.h" | 43 #include "chrome/browser/ui/webui/options/options_ui.h" |
| 43 #include "chrome/browser/ui/webui/password_manager_internals/password_manager_in ternals_ui.h" | 44 #include "chrome/browser/ui/webui/password_manager_internals/password_manager_in ternals_ui.h" |
| 44 #include "chrome/browser/ui/webui/plugins_ui.h" | 45 #include "chrome/browser/ui/webui/plugins_ui.h" |
| 45 #include "chrome/browser/ui/webui/predictors/predictors_ui.h" | 46 #include "chrome/browser/ui/webui/predictors/predictors_ui.h" |
| 46 #include "chrome/browser/ui/webui/profiler_ui.h" | 47 #include "chrome/browser/ui/webui/profiler_ui.h" |
| 47 #include "chrome/browser/ui/webui/signin/inline_login_ui.h" | 48 #include "chrome/browser/ui/webui/signin/inline_login_ui.h" |
| 48 #include "chrome/browser/ui/webui/signin/profile_signin_confirmation_ui.h" | 49 #include "chrome/browser/ui/webui/signin/profile_signin_confirmation_ui.h" |
| (...skipping 311 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 360 if (url.host() == chrome::kChromeUIGCMInternalsHost) | 361 if (url.host() == chrome::kChromeUIGCMInternalsHost) |
| 361 return &NewWebUI<GCMInternalsUI>; | 362 return &NewWebUI<GCMInternalsUI>; |
| 362 // Help is implemented with native UI elements on Android. | 363 // Help is implemented with native UI elements on Android. |
| 363 if (url.host() == chrome::kChromeUIHelpFrameHost) | 364 if (url.host() == chrome::kChromeUIHelpFrameHost) |
| 364 return &NewWebUI<HelpUI>; | 365 return &NewWebUI<HelpUI>; |
| 365 // Identity API is not available on Android. | 366 // Identity API is not available on Android. |
| 366 if (url.host() == chrome::kChromeUIIdentityInternalsHost) | 367 if (url.host() == chrome::kChromeUIIdentityInternalsHost) |
| 367 return &NewWebUI<IdentityInternalsUI>; | 368 return &NewWebUI<IdentityInternalsUI>; |
| 368 if (url.host() == chrome::kChromeUINewTabHost) | 369 if (url.host() == chrome::kChromeUINewTabHost) |
| 369 return &NewWebUI<NewTabUI>; | 370 return &NewWebUI<NewTabUI>; |
| 371 if (url.host() == chrome::kChromeUIMdSettingsHost && | |
| 372 ::switches::MdSettingsEnabled()) { | |
| 373 LOG(ERROR) << "url host is MD settings host"; | |
|
stevenjb
2015/02/04 02:19:15
VLOG (I know it's less convenient but we shouldn't
michaelpg
2015/02/04 02:35:29
I would just remove this logging altogether.
Oren Blasberg
2015/02/04 18:31:51
Done. Sorry guys I must've forgotten to do 'git cl
| |
| 374 return &NewWebUI<MdSettingsUI>; | |
| 375 } | |
| 370 // Android does not support plugins for now. | 376 // Android does not support plugins for now. |
| 371 if (url.host() == chrome::kChromeUIPluginsHost) | 377 if (url.host() == chrome::kChromeUIPluginsHost) |
| 372 return &NewWebUI<PluginsUI>; | 378 return &NewWebUI<PluginsUI>; |
| 373 if (url.host() == chrome::kChromeUIQuotaInternalsHost) | 379 if (url.host() == chrome::kChromeUIQuotaInternalsHost) |
| 374 return &NewWebUI<QuotaInternalsUI>; | 380 return &NewWebUI<QuotaInternalsUI>; |
| 375 // Settings are implemented with native UI elements on Android. | 381 // Settings are implemented with native UI elements on Android. |
| 376 // Handle chrome://settings if settings in a window and about in settings | 382 // Handle chrome://settings if settings in a window and about in settings |
| 377 // are enabled. | 383 // are enabled. |
| 378 if (url.host() == chrome::kChromeUISettingsFrameHost || | 384 if (url.host() == chrome::kChromeUISettingsFrameHost || |
| 379 (url.host() == chrome::kChromeUISettingsHost && | 385 (url.host() == chrome::kChromeUISettingsHost && |
| 380 ::switches::AboutInSettingsEnabled())) { | 386 ::switches::AboutInSettingsEnabled())) { |
| 387 LOG(ERROR) << "url host is regular settings host"; | |
|
stevenjb
2015/02/04 02:19:15
And definitely not here :)
Oren Blasberg
2015/02/04 18:31:51
Done.
| |
| 381 return &NewWebUI<options::OptionsUI>; | 388 return &NewWebUI<options::OptionsUI>; |
| 382 } | 389 } |
| 383 if (url.host() == chrome::kChromeUISuggestionsInternalsHost) | 390 if (url.host() == chrome::kChromeUISuggestionsInternalsHost) |
| 384 return &NewWebUI<SuggestionsInternalsUI>; | 391 return &NewWebUI<SuggestionsInternalsUI>; |
| 385 if (url.host() == chrome::kChromeUISyncFileSystemInternalsHost) | 392 if (url.host() == chrome::kChromeUISyncFileSystemInternalsHost) |
| 386 return &NewWebUI<SyncFileSystemInternalsUI>; | 393 return &NewWebUI<SyncFileSystemInternalsUI>; |
| 387 if (url.host() == chrome::kChromeUISystemInfoHost) | 394 if (url.host() == chrome::kChromeUISystemInfoHost) |
| 388 return &NewWebUI<SystemInfoUI>; | 395 return &NewWebUI<SystemInfoUI>; |
| 389 // Uber frame is not used on Android. | 396 // Uber frame is not used on Android. |
| 390 if (url.host() == chrome::kChromeUIUberFrameHost) | 397 if (url.host() == chrome::kChromeUIUberFrameHost) |
| (...skipping 330 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 721 #endif | 728 #endif |
| 722 | 729 |
| 723 // Android doesn't use the plugins pages. | 730 // Android doesn't use the plugins pages. |
| 724 if (page_url.host() == chrome::kChromeUIPluginsHost) | 731 if (page_url.host() == chrome::kChromeUIPluginsHost) |
| 725 return PluginsUI::GetFaviconResourceBytes(scale_factor); | 732 return PluginsUI::GetFaviconResourceBytes(scale_factor); |
| 726 | 733 |
| 727 #endif | 734 #endif |
| 728 | 735 |
| 729 return NULL; | 736 return NULL; |
| 730 } | 737 } |
| OLD | NEW |