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 |
70 LoginStatus TestSystemTrayDelegate::GetUserLoginStatus() const { | 74 LoginStatus TestSystemTrayDelegate::GetUserLoginStatus() const { |
71 // Initial login status has been changed for testing. | 75 // Initial login status has been changed for testing. |
72 if (g_initial_status != LoginStatus::USER && | 76 if (g_initial_status != LoginStatus::USER && |
73 g_initial_status == login_status_) { | 77 g_initial_status == login_status_) { |
74 return login_status_; | 78 return login_status_; |
75 } | 79 } |
76 | 80 |
77 // At new user image screen manager->IsUserLoggedIn() would return true | 81 // At new user image screen manager->IsUserLoggedIn() would return true |
78 // but there's no browser session available yet so use SessionStarted(). | 82 // but there's no browser session available yet so use SessionStarted(). |
79 SessionStateDelegate* delegate = WmShell::Get()->GetSessionStateDelegate(); | 83 SessionStateDelegate* delegate = WmShell::Get()->GetSessionStateDelegate(); |
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
135 return base::MakeUnique<TrayRotationLock>(tray); | 139 return base::MakeUnique<TrayRotationLock>(tray); |
136 #else | 140 #else |
137 return nullptr; | 141 return nullptr; |
138 #endif | 142 #endif |
139 } | 143 } |
140 | 144 |
141 void TestSystemTrayDelegate::GetCurrentIME(IMEInfo* info) { | 145 void TestSystemTrayDelegate::GetCurrentIME(IMEInfo* info) { |
142 *info = current_ime_; | 146 *info = current_ime_; |
143 } | 147 } |
144 | 148 |
| 149 void TestSystemTrayDelegate::GetAvailableIMEList(IMEInfoList* list) { |
| 150 *list = ime_list_; |
| 151 } |
| 152 |
145 } // namespace test | 153 } // namespace test |
146 } // namespace ash | 154 } // namespace ash |
OLD | NEW |