Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(6)

Side by Side Diff: ash/test/test_system_tray_delegate.cc

Issue 1996563002: Add ImeMenuTray element. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix patch failure. Created 4 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « ash/test/test_system_tray_delegate.h ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 45 matching lines...) Expand 10 before | Expand all | Expand 10 after
56 void TestSystemTrayDelegate::SetSessionLengthLimitForTest( 56 void TestSystemTrayDelegate::SetSessionLengthLimitForTest(
57 const base::TimeDelta& new_limit) { 57 const base::TimeDelta& new_limit) {
58 session_length_limit_ = new_limit; 58 session_length_limit_ = new_limit;
59 session_length_limit_set_ = true; 59 session_length_limit_set_ = true;
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) {
67 current_ime_ = info;
68 }
69
66 LoginStatus TestSystemTrayDelegate::GetUserLoginStatus() const { 70 LoginStatus TestSystemTrayDelegate::GetUserLoginStatus() const {
67 // Initial login status has been changed for testing. 71 // Initial login status has been changed for testing.
68 if (g_initial_status != LoginStatus::USER && 72 if (g_initial_status != LoginStatus::USER &&
69 g_initial_status == login_status_) { 73 g_initial_status == login_status_) {
70 return login_status_; 74 return login_status_;
71 } 75 }
72 76
73 // At new user image screen manager->IsUserLoggedIn() would return true 77 // At new user image screen manager->IsUserLoggedIn() would return true
74 // but there's no browser session available yet so use SessionStarted(). 78 // but there's no browser session available yet so use SessionStarted().
75 SessionStateDelegate* delegate = WmShell::Get()->GetSessionStateDelegate(); 79 SessionStateDelegate* delegate = WmShell::Get()->GetSessionStateDelegate();
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after
127 131
128 std::unique_ptr<SystemTrayItem> 132 std::unique_ptr<SystemTrayItem>
129 TestSystemTrayDelegate::CreateRotationLockTrayItem(SystemTray* tray) { 133 TestSystemTrayDelegate::CreateRotationLockTrayItem(SystemTray* tray) {
130 #if defined(OS_CHROMEOS) 134 #if defined(OS_CHROMEOS)
131 return base::MakeUnique<TrayRotationLock>(tray); 135 return base::MakeUnique<TrayRotationLock>(tray);
132 #else 136 #else
133 return nullptr; 137 return nullptr;
134 #endif 138 #endif
135 } 139 }
136 140
141 void TestSystemTrayDelegate::GetCurrentIME(IMEInfo* info) {
142 *info = current_ime_;
143 }
144
137 } // namespace test 145 } // namespace test
138 } // namespace ash 146 } // namespace ash
OLDNEW
« no previous file with comments | « ash/test/test_system_tray_delegate.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698