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

Side by Side Diff: chrome/browser/chromeos/system/ash_system_tray_delegate.cc

Issue 10827009: Don't show tray on OOBE boot (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: proper fix Created 8 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/chromeos/system/ash_system_tray_delegate.h" 5 #include "chrome/browser/chromeos/system/ash_system_tray_delegate.h"
6 6
7 #include "ash/shell.h" 7 #include "ash/shell.h"
8 #include "ash/shell_window_ids.h" 8 #include "ash/shell_window_ids.h"
9 #include "ash/system/audio/audio_observer.h" 9 #include "ash/system/audio/audio_observer.h"
10 #include "ash/system/bluetooth/bluetooth_observer.h" 10 #include "ash/system/bluetooth/bluetooth_observer.h"
(...skipping 29 matching lines...) Expand all
40 #include "chrome/browser/chromeos/gdata/gdata_util.h" 40 #include "chrome/browser/chromeos/gdata/gdata_util.h"
41 #include "chrome/browser/chromeos/input_method/input_method_manager.h" 41 #include "chrome/browser/chromeos/input_method/input_method_manager.h"
42 #include "chrome/browser/chromeos/input_method/input_method_util.h" 42 #include "chrome/browser/chromeos/input_method/input_method_util.h"
43 #include "chrome/browser/chromeos/input_method/xkeyboard.h" 43 #include "chrome/browser/chromeos/input_method/xkeyboard.h"
44 #include "chrome/browser/chromeos/kiosk_mode/kiosk_mode_settings.h" 44 #include "chrome/browser/chromeos/kiosk_mode/kiosk_mode_settings.h"
45 #include "chrome/browser/chromeos/login/base_login_display_host.h" 45 #include "chrome/browser/chromeos/login/base_login_display_host.h"
46 #include "chrome/browser/chromeos/login/login_display_host.h" 46 #include "chrome/browser/chromeos/login/login_display_host.h"
47 #include "chrome/browser/chromeos/login/message_bubble.h" 47 #include "chrome/browser/chromeos/login/message_bubble.h"
48 #include "chrome/browser/chromeos/login/user.h" 48 #include "chrome/browser/chromeos/login/user.h"
49 #include "chrome/browser/chromeos/login/user_manager.h" 49 #include "chrome/browser/chromeos/login/user_manager.h"
50 #include "chrome/browser/chromeos/login/wizard_controller.h"
50 #include "chrome/browser/chromeos/mobile_config.h" 51 #include "chrome/browser/chromeos/mobile_config.h"
51 #include "chrome/browser/chromeos/status/data_promo_notification.h" 52 #include "chrome/browser/chromeos/status/data_promo_notification.h"
52 #include "chrome/browser/chromeos/status/network_menu.h" 53 #include "chrome/browser/chromeos/status/network_menu.h"
53 #include "chrome/browser/chromeos/status/network_menu_icon.h" 54 #include "chrome/browser/chromeos/status/network_menu_icon.h"
54 #include "chrome/browser/chromeos/system_key_event_listener.h" 55 #include "chrome/browser/chromeos/system_key_event_listener.h"
55 #include "chrome/browser/chromeos/system/timezone_settings.h" 56 #include "chrome/browser/chromeos/system/timezone_settings.h"
56 #include "chrome/browser/lifetime/application_lifetime.h" 57 #include "chrome/browser/lifetime/application_lifetime.h"
57 #include "chrome/browser/prefs/pref_service.h" 58 #include "chrome/browser/prefs/pref_service.h"
58 #include "chrome/browser/profiles/profile_manager.h" 59 #include "chrome/browser/profiles/profile_manager.h"
59 #include "chrome/browser/ui/browser_finder.h" 60 #include "chrome/browser/ui/browser_finder.h"
(...skipping 190 matching lines...) Expand 10 before | Expand all | Expand 10 after
250 system_service->docs_service()->operation_registry()-> 251 system_service->docs_service()->operation_registry()->
251 RemoveObserver(this); 252 RemoveObserver(this);
252 } 253 }
253 } 254 }
254 } 255 }
255 256
256 // Overridden from ash::SystemTrayDelegate: 257 // Overridden from ash::SystemTrayDelegate:
257 virtual bool GetTrayVisibilityOnStartup() OVERRIDE { 258 virtual bool GetTrayVisibilityOnStartup() OVERRIDE {
258 // If we're either logged in (doesn't matter in KioskMode or not), 259 // If we're either logged in (doesn't matter in KioskMode or not),
259 // or not in KioskMode at all, return true. 260 // or not in KioskMode at all, return true.
261 // If not registered i.e. OOBE is still active, start with tray hidden,
262 // it will be enabled if needed by OOBE flow.
263 bool is_registered = chromeos::WizardController::IsDeviceRegistered();
260 return UserManager::Get()->IsUserLoggedIn() || 264 return UserManager::Get()->IsUserLoggedIn() ||
261 !chromeos::KioskModeSettings::Get()->IsKioskModeEnabled(); 265 (!chromeos::KioskModeSettings::Get()->IsKioskModeEnabled() &&
266 is_registered);
262 } 267 }
263 268
264 virtual const string16 GetUserDisplayName() const OVERRIDE { 269 virtual const string16 GetUserDisplayName() const OVERRIDE {
265 return UserManager::Get()->GetLoggedInUser().GetDisplayName(); 270 return UserManager::Get()->GetLoggedInUser().GetDisplayName();
266 } 271 }
267 272
268 virtual const std::string GetUserEmail() const OVERRIDE { 273 virtual const std::string GetUserEmail() const OVERRIDE {
269 return UserManager::Get()->GetLoggedInUser().display_email(); 274 return UserManager::Get()->GetLoggedInUser().display_email();
270 } 275 }
271 276
(...skipping 976 matching lines...) Expand 10 before | Expand all | Expand 10 after
1248 DISALLOW_COPY_AND_ASSIGN(SystemTrayDelegate); 1253 DISALLOW_COPY_AND_ASSIGN(SystemTrayDelegate);
1249 }; 1254 };
1250 1255
1251 } // namespace 1256 } // namespace
1252 1257
1253 ash::SystemTrayDelegate* CreateSystemTrayDelegate(ash::SystemTray* tray) { 1258 ash::SystemTrayDelegate* CreateSystemTrayDelegate(ash::SystemTray* tray) {
1254 return new chromeos::SystemTrayDelegate(tray); 1259 return new chromeos::SystemTrayDelegate(tray);
1255 } 1260 }
1256 1261
1257 } // namespace chromeos 1262 } // namespace chromeos
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698