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

Side by Side Diff: chrome/browser/ui/ash/chrome_shell_delegate.cc

Issue 210903003: Implemented system tray UI for new account management. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: More comments addressed. Created 6 years, 9 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/ash/chrome_shell_delegate.h" 5 #include "chrome/browser/ui/ash/chrome_shell_delegate.h"
6 6
7 #include "apps/app_window.h" 7 #include "apps/app_window.h"
8 #include "apps/app_window_registry.h" 8 #include "apps/app_window_registry.h"
9 #include "ash/content_support/gpu_support_impl.h" 9 #include "ash/content_support/gpu_support_impl.h"
10 #include "ash/host/window_tree_host_factory.h" 10 #include "ash/host/window_tree_host_factory.h"
11 #include "ash/magnifier/magnifier_constants.h" 11 #include "ash/magnifier/magnifier_constants.h"
12 #include "ash/wm/window_state.h" 12 #include "ash/wm/window_state.h"
13 #include "ash/wm/window_util.h" 13 #include "ash/wm/window_util.h"
14 #include "base/command_line.h" 14 #include "base/command_line.h"
15 #include "chrome/browser/app_mode/app_mode_utils.h" 15 #include "chrome/browser/app_mode/app_mode_utils.h"
16 #include "chrome/browser/lifetime/application_lifetime.h" 16 #include "chrome/browser/lifetime/application_lifetime.h"
17 #include "chrome/browser/profiles/profile_manager.h" 17 #include "chrome/browser/profiles/profile_manager.h"
18 #include "chrome/browser/ui/app_list/app_list_service.h" 18 #include "chrome/browser/ui/app_list/app_list_service.h"
19 #include "chrome/browser/ui/app_list/app_list_view_delegate.h" 19 #include "chrome/browser/ui/app_list/app_list_view_delegate.h"
20 #include "chrome/browser/ui/ash/app_list/app_list_controller_ash.h" 20 #include "chrome/browser/ui/ash/app_list/app_list_controller_ash.h"
21 #include "chrome/browser/ui/ash/ash_keyboard_controller_proxy.h" 21 #include "chrome/browser/ui/ash/ash_keyboard_controller_proxy.h"
22 #include "chrome/browser/ui/ash/launcher/chrome_launcher_controller.h" 22 #include "chrome/browser/ui/ash/launcher/chrome_launcher_controller.h"
23 #include "chrome/browser/ui/ash/launcher/launcher_context_menu.h" 23 #include "chrome/browser/ui/ash/launcher/launcher_context_menu.h"
24 #include "chrome/browser/ui/browser_commands.h" 24 #include "chrome/browser/ui/browser_commands.h"
25 #include "chrome/common/chrome_switches.h" 25 #include "chrome/common/chrome_switches.h"
26 #include "chrome/common/profile_management_switches.h"
26 #include "grit/chromium_strings.h" 27 #include "grit/chromium_strings.h"
27 #include "grit/generated_resources.h" 28 #include "grit/generated_resources.h"
28 #include "ui/base/l10n/l10n_util.h" 29 #include "ui/base/l10n/l10n_util.h"
29 30
30 #if defined(OS_CHROMEOS) 31 #if defined(OS_CHROMEOS)
31 #include "chrome/browser/chromeos/accessibility/accessibility_manager.h" 32 #include "chrome/browser/chromeos/accessibility/accessibility_manager.h"
32 #include "chrome/browser/chromeos/display/display_configuration_observer.h" 33 #include "chrome/browser/chromeos/display/display_configuration_observer.h"
33 #include "chrome/browser/chromeos/login/user_manager.h" 34 #include "chrome/browser/chromeos/login/user_manager.h"
34 #endif 35 #endif
35 36
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after
83 #if defined(OS_CHROMEOS) 84 #if defined(OS_CHROMEOS)
84 return chromeos::AccessibilityManager::Get()->IsIncognitoAllowed(); 85 return chromeos::AccessibilityManager::Get()->IsIncognitoAllowed();
85 #endif 86 #endif
86 return true; 87 return true;
87 } 88 }
88 89
89 bool ChromeShellDelegate::IsRunningInForcedAppMode() const { 90 bool ChromeShellDelegate::IsRunningInForcedAppMode() const {
90 return chrome::IsRunningInForcedAppMode(); 91 return chrome::IsRunningInForcedAppMode();
91 } 92 }
92 93
94 bool ChromeShellDelegate::IsAccountManagementEnabled() const {
95 #if defined(OS_CHROMEOS)
96 return switches::IsNewProfileManagement();
97 #endif
98 return false;
99 }
100
93 void ChromeShellDelegate::Exit() { 101 void ChromeShellDelegate::Exit() {
94 chrome::AttemptUserExit(); 102 chrome::AttemptUserExit();
95 } 103 }
96 104
97 content::BrowserContext* ChromeShellDelegate::GetActiveBrowserContext() { 105 content::BrowserContext* ChromeShellDelegate::GetActiveBrowserContext() {
98 #if defined(OS_CHROMEOS) 106 #if defined(OS_CHROMEOS)
99 DCHECK(chromeos::UserManager::Get()->GetLoggedInUsers().size()); 107 DCHECK(chromeos::UserManager::Get()->GetLoggedInUsers().size());
100 #endif 108 #endif
101 return ProfileManager::GetActiveUserProfile(); 109 return ProfileManager::GetActiveUserProfile();
102 } 110 }
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after
146 } 154 }
147 155
148 base::string16 ChromeShellDelegate::GetProductName() const { 156 base::string16 ChromeShellDelegate::GetProductName() const {
149 return l10n_util::GetStringUTF16(IDS_PRODUCT_NAME); 157 return l10n_util::GetStringUTF16(IDS_PRODUCT_NAME);
150 } 158 }
151 159
152 keyboard::KeyboardControllerProxy* 160 keyboard::KeyboardControllerProxy*
153 ChromeShellDelegate::CreateKeyboardControllerProxy() { 161 ChromeShellDelegate::CreateKeyboardControllerProxy() {
154 return new AshKeyboardControllerProxy(); 162 return new AshKeyboardControllerProxy();
155 } 163 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698