OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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/test/test_system_tray_delegate.h" | 5 #include "ash/test/test_system_tray_delegate.h" |
6 | 6 |
7 #include <string> | 7 #include <string> |
8 | 8 |
9 #include "ash/common/login_status.h" | 9 #include "ash/common/login_status.h" |
10 #include "ash/common/session/session_state_delegate.h" | 10 #include "ash/common/session/session_state_delegate.h" |
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
60 } | 60 } |
61 | 61 |
62 void TestSystemTrayDelegate::ClearSessionLengthLimit() { | 62 void TestSystemTrayDelegate::ClearSessionLengthLimit() { |
63 session_length_limit_set_ = false; | 63 session_length_limit_set_ = false; |
64 } | 64 } |
65 | 65 |
66 void TestSystemTrayDelegate::SetCurrentIME(const IMEInfo& info) { | 66 void TestSystemTrayDelegate::SetCurrentIME(const IMEInfo& info) { |
67 current_ime_ = info; | 67 current_ime_ = info; |
68 } | 68 } |
69 | 69 |
70 void TestSystemTrayDelegate::SetAvailableIMEList(const IMEInfoList& list) { | |
71 ime_list_ = list; | |
72 } | |
73 | |
74 LoginStatus TestSystemTrayDelegate::GetUserLoginStatus() const { | 70 LoginStatus TestSystemTrayDelegate::GetUserLoginStatus() const { |
75 // Initial login status has been changed for testing. | 71 // Initial login status has been changed for testing. |
76 if (g_initial_status != LoginStatus::USER && | 72 if (g_initial_status != LoginStatus::USER && |
77 g_initial_status == login_status_) { | 73 g_initial_status == login_status_) { |
78 return login_status_; | 74 return login_status_; |
79 } | 75 } |
80 | 76 |
81 // At new user image screen manager->IsUserLoggedIn() would return true | 77 // At new user image screen manager->IsUserLoggedIn() would return true |
82 // but there's no browser session available yet so use SessionStarted(). | 78 // but there's no browser session available yet so use SessionStarted(). |
83 SessionStateDelegate* delegate = WmShell::Get()->GetSessionStateDelegate(); | 79 SessionStateDelegate* delegate = WmShell::Get()->GetSessionStateDelegate(); |
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
139 return base::MakeUnique<TrayRotationLock>(tray); | 135 return base::MakeUnique<TrayRotationLock>(tray); |
140 #else | 136 #else |
141 return nullptr; | 137 return nullptr; |
142 #endif | 138 #endif |
143 } | 139 } |
144 | 140 |
145 void TestSystemTrayDelegate::GetCurrentIME(IMEInfo* info) { | 141 void TestSystemTrayDelegate::GetCurrentIME(IMEInfo* info) { |
146 *info = current_ime_; | 142 *info = current_ime_; |
147 } | 143 } |
148 | 144 |
149 void TestSystemTrayDelegate::GetAvailableIMEList(IMEInfoList* list) { | |
150 *list = ime_list_; | |
151 } | |
152 | |
153 } // namespace test | 145 } // namespace test |
154 } // namespace ash | 146 } // namespace ash |
OLD | NEW |