| 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/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 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 46 #include "chrome/browser/chromeos/login/user.h" | 46 #include "chrome/browser/chromeos/login/user.h" |
| 47 #include "chrome/browser/chromeos/login/user_manager.h" | 47 #include "chrome/browser/chromeos/login/user_manager.h" |
| 48 #include "chrome/browser/chromeos/mobile_config.h" | 48 #include "chrome/browser/chromeos/mobile_config.h" |
| 49 #include "chrome/browser/chromeos/status/data_promo_notification.h" | 49 #include "chrome/browser/chromeos/status/data_promo_notification.h" |
| 50 #include "chrome/browser/chromeos/status/network_menu.h" | 50 #include "chrome/browser/chromeos/status/network_menu.h" |
| 51 #include "chrome/browser/chromeos/status/network_menu_icon.h" | 51 #include "chrome/browser/chromeos/status/network_menu_icon.h" |
| 52 #include "chrome/browser/chromeos/system/timezone_settings.h" | 52 #include "chrome/browser/chromeos/system/timezone_settings.h" |
| 53 #include "chrome/browser/chromeos/system_key_event_listener.h" | 53 #include "chrome/browser/chromeos/system_key_event_listener.h" |
| 54 #include "chrome/browser/google_apis/drive_service_interface.h" | 54 #include "chrome/browser/google_apis/drive_service_interface.h" |
| 55 #include "chrome/browser/lifetime/application_lifetime.h" | 55 #include "chrome/browser/lifetime/application_lifetime.h" |
| 56 #include "chrome/browser/policy/browser_policy_connector.h" |
| 56 #include "chrome/browser/prefs/pref_service.h" | 57 #include "chrome/browser/prefs/pref_service.h" |
| 57 #include "chrome/browser/profiles/profile_manager.h" | 58 #include "chrome/browser/profiles/profile_manager.h" |
| 58 #include "chrome/browser/ui/ash/volume_controller_chromeos.h" | 59 #include "chrome/browser/ui/ash/volume_controller_chromeos.h" |
| 59 #include "chrome/browser/ui/browser.h" | 60 #include "chrome/browser/ui/browser.h" |
| 60 #include "chrome/browser/ui/browser_finder.h" | 61 #include "chrome/browser/ui/browser_finder.h" |
| 61 #include "chrome/browser/ui/chrome_pages.h" | 62 #include "chrome/browser/ui/chrome_pages.h" |
| 62 #include "chrome/browser/ui/host_desktop.h" | 63 #include "chrome/browser/ui/host_desktop.h" |
| 63 #include "chrome/browser/ui/singleton_tabs.h" | 64 #include "chrome/browser/ui/singleton_tabs.h" |
| 64 #include "chrome/browser/upgrade_detector.h" | 65 #include "chrome/browser/upgrade_detector.h" |
| 65 #include "chrome/common/chrome_notification_types.h" | 66 #include "chrome/common/chrome_notification_types.h" |
| (...skipping 224 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 290 return ash::user::LOGGED_IN_OWNER; | 291 return ash::user::LOGGED_IN_OWNER; |
| 291 if (manager->IsLoggedInAsGuest()) | 292 if (manager->IsLoggedInAsGuest()) |
| 292 return ash::user::LOGGED_IN_GUEST; | 293 return ash::user::LOGGED_IN_GUEST; |
| 293 if (manager->IsLoggedInAsDemoUser()) | 294 if (manager->IsLoggedInAsDemoUser()) |
| 294 return ash::user::LOGGED_IN_KIOSK; | 295 return ash::user::LOGGED_IN_KIOSK; |
| 295 if (manager->IsLoggedInAsPublicAccount()) | 296 if (manager->IsLoggedInAsPublicAccount()) |
| 296 return ash::user::LOGGED_IN_PUBLIC; | 297 return ash::user::LOGGED_IN_PUBLIC; |
| 297 return ash::user::LOGGED_IN_USER; | 298 return ash::user::LOGGED_IN_USER; |
| 298 } | 299 } |
| 299 | 300 |
| 301 virtual const std::string GetEnterpriseDomain() const OVERRIDE { |
| 302 return g_browser_process->browser_policy_connector()->GetEnterpriseDomain(); |
| 303 } |
| 304 |
| 300 virtual bool SystemShouldUpgrade() const OVERRIDE { | 305 virtual bool SystemShouldUpgrade() const OVERRIDE { |
| 301 return UpgradeDetector::GetInstance()->notify_upgrade(); | 306 return UpgradeDetector::GetInstance()->notify_upgrade(); |
| 302 } | 307 } |
| 303 | 308 |
| 304 virtual base::HourClockType GetHourClockType() const OVERRIDE { | 309 virtual base::HourClockType GetHourClockType() const OVERRIDE { |
| 305 return clock_type_; | 310 return clock_type_; |
| 306 } | 311 } |
| 307 | 312 |
| 308 virtual PowerSupplyStatus GetPowerSupplyStatus() const OVERRIDE { | 313 virtual PowerSupplyStatus GetPowerSupplyStatus() const OVERRIDE { |
| 309 return power_supply_status_; | 314 return power_supply_status_; |
| (...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 357 } | 362 } |
| 358 | 363 |
| 359 virtual void ShowHelp() OVERRIDE { | 364 virtual void ShowHelp() OVERRIDE { |
| 360 chrome::ShowHelp(GetAppropriateBrowser(), chrome::HELP_SOURCE_MENU); | 365 chrome::ShowHelp(GetAppropriateBrowser(), chrome::HELP_SOURCE_MENU); |
| 361 } | 366 } |
| 362 | 367 |
| 363 virtual void ShowAccessibilityHelp() OVERRIDE { | 368 virtual void ShowAccessibilityHelp() OVERRIDE { |
| 364 accessibility::ShowAccessibilityHelp(GetAppropriateBrowser()); | 369 accessibility::ShowAccessibilityHelp(GetAppropriateBrowser()); |
| 365 } | 370 } |
| 366 | 371 |
| 372 virtual void ShowPublicAccountInfo() OVERRIDE { |
| 373 chrome::ShowPolicy(GetAppropriateBrowser()); |
| 374 } |
| 375 |
| 367 virtual void ShutDown() OVERRIDE { | 376 virtual void ShutDown() OVERRIDE { |
| 368 ash::Shell::GetInstance()->session_state_controller()->RequestShutdown(); | 377 ash::Shell::GetInstance()->session_state_controller()->RequestShutdown(); |
| 369 } | 378 } |
| 370 | 379 |
| 371 virtual void SignOut() OVERRIDE { | 380 virtual void SignOut() OVERRIDE { |
| 372 browser::AttemptUserExit(); | 381 browser::AttemptUserExit(); |
| 373 } | 382 } |
| 374 | 383 |
| 375 virtual void RequestLockScreen() OVERRIDE { | 384 virtual void RequestLockScreen() OVERRIDE { |
| 376 DBusThreadManager::Get()->GetSessionManagerClient()->RequestLockScreen(); | 385 DBusThreadManager::Get()->GetSessionManagerClient()->RequestLockScreen(); |
| (...skipping 912 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1289 DISALLOW_COPY_AND_ASSIGN(SystemTrayDelegate); | 1298 DISALLOW_COPY_AND_ASSIGN(SystemTrayDelegate); |
| 1290 }; | 1299 }; |
| 1291 | 1300 |
| 1292 } // namespace | 1301 } // namespace |
| 1293 | 1302 |
| 1294 ash::SystemTrayDelegate* CreateSystemTrayDelegate() { | 1303 ash::SystemTrayDelegate* CreateSystemTrayDelegate() { |
| 1295 return new chromeos::SystemTrayDelegate(); | 1304 return new chromeos::SystemTrayDelegate(); |
| 1296 } | 1305 } |
| 1297 | 1306 |
| 1298 } // namespace chromeos | 1307 } // namespace chromeos |
| OLD | NEW |