| 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 "ash/system/tray/test_system_tray_delegate.h" | 5 #include "ash/system/tray/test_system_tray_delegate.h" | 
| 6 | 6 | 
| 7 #include <string> | 7 #include <string> | 
| 8 | 8 | 
| 9 #include "ash/session_state_delegate.h" |  | 
| 10 #include "ash/shell.h" | 9 #include "ash/shell.h" | 
|  | 10 #include "ash/shell_delegate.h" | 
| 11 #include "ash/volume_control_delegate.h" | 11 #include "ash/volume_control_delegate.h" | 
| 12 #include "base/utf_string_conversions.h" | 12 #include "base/utf_string_conversions.h" | 
| 13 #include "base/message_loop.h" | 13 #include "base/message_loop.h" | 
| 14 #include "base/string16.h" | 14 #include "base/string16.h" | 
| 15 #include "base/time.h" | 15 #include "base/time.h" | 
| 16 | 16 | 
| 17 namespace ash { | 17 namespace ash { | 
| 18 namespace test { | 18 namespace test { | 
| 19 | 19 | 
| 20 namespace { | 20 namespace { | 
| (...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 83   return "über@tray"; | 83   return "über@tray"; | 
| 84 } | 84 } | 
| 85 | 85 | 
| 86 const gfx::ImageSkia& TestSystemTrayDelegate::GetUserImage() const { | 86 const gfx::ImageSkia& TestSystemTrayDelegate::GetUserImage() const { | 
| 87   return null_image_; | 87   return null_image_; | 
| 88 } | 88 } | 
| 89 | 89 | 
| 90 user::LoginStatus TestSystemTrayDelegate::GetUserLoginStatus() const { | 90 user::LoginStatus TestSystemTrayDelegate::GetUserLoginStatus() const { | 
| 91   // At new user image screen manager->IsUserLoggedIn() would return true | 91   // At new user image screen manager->IsUserLoggedIn() would return true | 
| 92   // but there's no browser session available yet so use SessionStarted(). | 92   // but there's no browser session available yet so use SessionStarted(). | 
| 93   SessionStateDelegate* delegate = | 93   if (!Shell::GetInstance()->delegate()->IsSessionStarted()) | 
| 94       Shell::GetInstance()->session_state_delegate(); |  | 
| 95 |  | 
| 96   if (!delegate->IsActiveUserSessionStarted()) |  | 
| 97     return ash::user::LOGGED_IN_NONE; | 94     return ash::user::LOGGED_IN_NONE; | 
| 98   if (delegate->IsScreenLocked()) | 95   if (Shell::GetInstance()->IsScreenLocked()) | 
| 99     return user::LOGGED_IN_LOCKED; | 96     return user::LOGGED_IN_LOCKED; | 
| 100   // TODO(nkostylev): Support LOGGED_IN_OWNER, LOGGED_IN_GUEST, LOGGED_IN_KIOSK, | 97   // TODO(nkostylev): Support LOGGED_IN_OWNER, LOGGED_IN_GUEST, LOGGED_IN_KIOSK, | 
| 101   //                  LOGGED_IN_PUBLIC. | 98   //                  LOGGED_IN_PUBLIC. | 
| 102   return user::LOGGED_IN_USER; | 99   return user::LOGGED_IN_USER; | 
| 103 } | 100 } | 
| 104 | 101 | 
| 105 bool TestSystemTrayDelegate::IsOobeCompleted() const { | 102 bool TestSystemTrayDelegate::IsOobeCompleted() const { | 
| 106   return true; | 103   return true; | 
| 107 } | 104 } | 
| 108 | 105 | 
| (...skipping 257 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 366 base::string16 TestSystemTrayDelegate::FormatTimeDuration( | 363 base::string16 TestSystemTrayDelegate::FormatTimeDuration( | 
| 367     const base::TimeDelta& delta) const { | 364     const base::TimeDelta& delta) const { | 
| 368   return base::string16(); | 365   return base::string16(); | 
| 369 } | 366 } | 
| 370 | 367 | 
| 371 void TestSystemTrayDelegate::MaybeSpeak(const std::string& utterance) const { | 368 void TestSystemTrayDelegate::MaybeSpeak(const std::string& utterance) const { | 
| 372 } | 369 } | 
| 373 | 370 | 
| 374 }  // namespace test | 371 }  // namespace test | 
| 375 }  // namespace ash | 372 }  // namespace ash | 
| OLD | NEW | 
|---|