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

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

Issue 16104008: First try at a user management screen for the desktop (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase and review comments Created 7 years, 5 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 "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 27 matching lines...) Expand all
38 #include "chrome/browser/ui/webui/ntp/new_tab_ui.h" 38 #include "chrome/browser/ui/webui/ntp/new_tab_ui.h"
39 #include "chrome/browser/ui/webui/omnibox/omnibox_ui.h" 39 #include "chrome/browser/ui/webui/omnibox/omnibox_ui.h"
40 #include "chrome/browser/ui/webui/options/options_ui.h" 40 #include "chrome/browser/ui/webui/options/options_ui.h"
41 #include "chrome/browser/ui/webui/performance_monitor/performance_monitor_ui.h" 41 #include "chrome/browser/ui/webui/performance_monitor/performance_monitor_ui.h"
42 #include "chrome/browser/ui/webui/plugins_ui.h" 42 #include "chrome/browser/ui/webui/plugins_ui.h"
43 #include "chrome/browser/ui/webui/predictors/predictors_ui.h" 43 #include "chrome/browser/ui/webui/predictors/predictors_ui.h"
44 #include "chrome/browser/ui/webui/print_preview/print_preview_ui.h" 44 #include "chrome/browser/ui/webui/print_preview/print_preview_ui.h"
45 #include "chrome/browser/ui/webui/profiler_ui.h" 45 #include "chrome/browser/ui/webui/profiler_ui.h"
46 #include "chrome/browser/ui/webui/quota_internals/quota_internals_ui.h" 46 #include "chrome/browser/ui/webui/quota_internals/quota_internals_ui.h"
47 #include "chrome/browser/ui/webui/signin/profile_signin_confirmation_ui.h" 47 #include "chrome/browser/ui/webui/signin/profile_signin_confirmation_ui.h"
48 #include "chrome/browser/ui/webui/signin/user_chooser_ui.h"
48 #include "chrome/browser/ui/webui/signin_internals_ui.h" 49 #include "chrome/browser/ui/webui/signin_internals_ui.h"
49 #include "chrome/browser/ui/webui/sync_internals_ui.h" 50 #include "chrome/browser/ui/webui/sync_internals_ui.h"
50 #include "chrome/browser/ui/webui/translate_internals/translate_internals_ui.h" 51 #include "chrome/browser/ui/webui/translate_internals/translate_internals_ui.h"
51 #include "chrome/browser/ui/webui/user_actions/user_actions_ui.h" 52 #include "chrome/browser/ui/webui/user_actions/user_actions_ui.h"
52 #include "chrome/browser/ui/webui/version_ui.h" 53 #include "chrome/browser/ui/webui/version_ui.h"
53 #include "chrome/common/chrome_switches.h" 54 #include "chrome/common/chrome_switches.h"
54 #include "chrome/common/extensions/extension_constants.h" 55 #include "chrome/common/extensions/extension_constants.h"
55 #include "chrome/common/extensions/feature_switch.h" 56 #include "chrome/common/extensions/feature_switch.h"
56 #include "chrome/common/pref_names.h" 57 #include "chrome/common/pref_names.h"
57 #include "chrome/common/url_constants.h" 58 #include "chrome/common/url_constants.h"
(...skipping 320 matching lines...) Expand 10 before | Expand all | Expand 10 after
378 } 379 }
379 #endif 380 #endif
380 381
381 #if defined(USE_AURA) 382 #if defined(USE_AURA)
382 if (url.host() == chrome::kChromeUIGestureConfigHost) 383 if (url.host() == chrome::kChromeUIGestureConfigHost)
383 return &NewWebUI<GestureConfigUI>; 384 return &NewWebUI<GestureConfigUI>;
384 if (url.host() == keyboard::kKeyboardWebUIHost) 385 if (url.host() == keyboard::kKeyboardWebUIHost)
385 return &NewWebUI<keyboard::KeyboardUIController>; 386 return &NewWebUI<keyboard::KeyboardUIController>;
386 #endif 387 #endif
387 388
389 #if !defined(OS_CHROMEOS) && !defined(OS_ANDROID) && !defined(OS_IOS)
390 if (url.host() == chrome::kChromeUIUserChooserHost &&
391 CommandLine::ForCurrentProcess()->HasSwitch(
392 switches::kNewProfileManagement))
393 return &NewWebUI<UserChooserUI>;
394 #endif
395
388 if (url.host() == chrome::kChromeUIChromeURLsHost || 396 if (url.host() == chrome::kChromeUIChromeURLsHost ||
389 url.host() == chrome::kChromeUICreditsHost || 397 url.host() == chrome::kChromeUICreditsHost ||
390 url.host() == chrome::kChromeUIDNSHost || 398 url.host() == chrome::kChromeUIDNSHost ||
391 url.host() == chrome::kChromeUIMemoryHost || 399 url.host() == chrome::kChromeUIMemoryHost ||
392 url.host() == chrome::kChromeUIMemoryRedirectHost || 400 url.host() == chrome::kChromeUIMemoryRedirectHost ||
393 url.host() == chrome::kChromeUIStatsHost || 401 url.host() == chrome::kChromeUIStatsHost ||
394 url.host() == chrome::kChromeUITermsHost 402 url.host() == chrome::kChromeUITermsHost
395 #if defined(OS_LINUX) || defined(OS_OPENBSD) 403 #if defined(OS_LINUX) || defined(OS_OPENBSD)
396 || url.host() == chrome::kChromeUILinuxProxyConfigHost 404 || url.host() == chrome::kChromeUILinuxProxyConfigHost
397 || url.host() == chrome::kChromeUISandboxHost 405 || url.host() == chrome::kChromeUISandboxHost
(...skipping 180 matching lines...) Expand 10 before | Expand all | Expand 10 after
578 if (page_url.host() == chrome::kChromeUISettingsFrameHost) 586 if (page_url.host() == chrome::kChromeUISettingsFrameHost)
579 return options::OptionsUI::GetFaviconResourceBytes(scale_factor); 587 return options::OptionsUI::GetFaviconResourceBytes(scale_factor);
580 588
581 // Android doesn't use the plugins pages. 589 // Android doesn't use the plugins pages.
582 if (page_url.host() == chrome::kChromeUIPluginsHost) 590 if (page_url.host() == chrome::kChromeUIPluginsHost)
583 return PluginsUI::GetFaviconResourceBytes(scale_factor); 591 return PluginsUI::GetFaviconResourceBytes(scale_factor);
584 #endif 592 #endif
585 593
586 return NULL; 594 return NULL;
587 } 595 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698