| 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 <algorithm> | 7 #include <algorithm> |
| 8 #include <set> | 8 #include <set> |
| 9 #include <string> | 9 #include <string> |
| 10 #include <vector> | 10 #include <vector> |
| (...skipping 13 matching lines...) Expand all Loading... |
| 24 #include "ash/system/ime/ime_observer.h" | 24 #include "ash/system/ime/ime_observer.h" |
| 25 #include "ash/system/logout_button/logout_button_observer.h" | 25 #include "ash/system/logout_button/logout_button_observer.h" |
| 26 #include "ash/system/tray/system_tray.h" | 26 #include "ash/system/tray/system_tray.h" |
| 27 #include "ash/system/tray/system_tray_delegate.h" | 27 #include "ash/system/tray/system_tray_delegate.h" |
| 28 #include "ash/system/tray/system_tray_notifier.h" | 28 #include "ash/system/tray/system_tray_notifier.h" |
| 29 #include "ash/system/tray_accessibility.h" | 29 #include "ash/system/tray_accessibility.h" |
| 30 #include "ash/system/tray_caps_lock.h" | 30 #include "ash/system/tray_caps_lock.h" |
| 31 #include "ash/system/user/update_observer.h" | 31 #include "ash/system/user/update_observer.h" |
| 32 #include "ash/system/user/user_observer.h" | 32 #include "ash/system/user/user_observer.h" |
| 33 #include "ash/volume_control_delegate.h" | 33 #include "ash/volume_control_delegate.h" |
| 34 #include "ash/wm/session_state_controller.h" | 34 #include "ash/wm/session_lock_state_controller.h" |
| 35 #include "base/bind_helpers.h" | 35 #include "base/bind_helpers.h" |
| 36 #include "base/callback.h" | 36 #include "base/callback.h" |
| 37 #include "base/chromeos/chromeos_version.h" | 37 #include "base/chromeos/chromeos_version.h" |
| 38 #include "base/command_line.h" | 38 #include "base/command_line.h" |
| 39 #include "base/logging.h" | 39 #include "base/logging.h" |
| 40 #include "base/memory/weak_ptr.h" | 40 #include "base/memory/weak_ptr.h" |
| 41 #include "base/prefs/pref_service.h" | 41 #include "base/prefs/pref_service.h" |
| 42 #include "base/stringprintf.h" | 42 #include "base/stringprintf.h" |
| 43 #include "base/time.h" | 43 #include "base/time.h" |
| 44 #include "base/utf_string_conversions.h" | 44 #include "base/utf_string_conversions.h" |
| (...skipping 540 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 585 // http://crbug.com/230865 | 585 // http://crbug.com/230865 |
| 586 if (UserManager::Get()->GetLoggedInUsers().size() >= 3) | 586 if (UserManager::Get()->GetLoggedInUsers().size() >= 3) |
| 587 return; | 587 return; |
| 588 | 588 |
| 589 // Launch sign in screen to add another user to current session. | 589 // Launch sign in screen to add another user to current session. |
| 590 if (UserManager::Get()->GetUsersAdmittedForMultiProfile().size()) | 590 if (UserManager::Get()->GetUsersAdmittedForMultiProfile().size()) |
| 591 UserAddingScreen::Get()->Start(); | 591 UserAddingScreen::Get()->Start(); |
| 592 } | 592 } |
| 593 | 593 |
| 594 virtual void ShutDown() OVERRIDE { | 594 virtual void ShutDown() OVERRIDE { |
| 595 ash::Shell::GetInstance()->session_state_controller()->RequestShutdown(); | 595 ash::Shell::GetInstance()-> |
| 596 session_lock_state_controller()->RequestShutdown(); |
| 596 } | 597 } |
| 597 | 598 |
| 598 virtual void SignOut() OVERRIDE { | 599 virtual void SignOut() OVERRIDE { |
| 599 chrome::AttemptUserExit(); | 600 chrome::AttemptUserExit(); |
| 600 } | 601 } |
| 601 | 602 |
| 602 virtual void RequestLockScreen() OVERRIDE { | 603 virtual void RequestLockScreen() OVERRIDE { |
| 603 // TODO(antrim) : additional logging for crbug/173178 | 604 // TODO(antrim) : additional logging for crbug/173178 |
| 604 LOG(WARNING) << "Requesting screen lock from AshSystemTrayDelegate"; | 605 LOG(WARNING) << "Requesting screen lock from AshSystemTrayDelegate"; |
| 605 DBusThreadManager::Get()->GetSessionManagerClient()->RequestLockScreen(); | 606 DBusThreadManager::Get()->GetSessionManagerClient()->RequestLockScreen(); |
| (...skipping 719 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1325 DISALLOW_COPY_AND_ASSIGN(SystemTrayDelegate); | 1326 DISALLOW_COPY_AND_ASSIGN(SystemTrayDelegate); |
| 1326 }; | 1327 }; |
| 1327 | 1328 |
| 1328 } // namespace | 1329 } // namespace |
| 1329 | 1330 |
| 1330 ash::SystemTrayDelegate* CreateSystemTrayDelegate() { | 1331 ash::SystemTrayDelegate* CreateSystemTrayDelegate() { |
| 1331 return new chromeos::SystemTrayDelegate(); | 1332 return new chromeos::SystemTrayDelegate(); |
| 1332 } | 1333 } |
| 1333 | 1334 |
| 1334 } // namespace chromeos | 1335 } // namespace chromeos |
| OLD | NEW |