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

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: Change SetWindowState() with SetImeWindow(). 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
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 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
48 void TestSystemTrayDelegate::SetSessionLengthLimitForTest( 48 void TestSystemTrayDelegate::SetSessionLengthLimitForTest(
49 const base::TimeDelta& new_limit) { 49 const base::TimeDelta& new_limit) {
50 session_length_limit_ = new_limit; 50 session_length_limit_ = new_limit;
51 session_length_limit_set_ = true; 51 session_length_limit_set_ = true;
52 } 52 }
53 53
54 void TestSystemTrayDelegate::ClearSessionLengthLimit() { 54 void TestSystemTrayDelegate::ClearSessionLengthLimit() {
55 session_length_limit_set_ = false; 55 session_length_limit_set_ = false;
56 } 56 }
57 57
58 void TestSystemTrayDelegate::SetCurrentIME(const IMEInfo& info) {
59 current_ime_ = info;
60 }
61
58 LoginStatus TestSystemTrayDelegate::GetUserLoginStatus() const { 62 LoginStatus TestSystemTrayDelegate::GetUserLoginStatus() const {
59 // Initial login status has been changed for testing. 63 // Initial login status has been changed for testing.
60 if (g_initial_status != LoginStatus::USER && 64 if (g_initial_status != LoginStatus::USER &&
61 g_initial_status == login_status_) { 65 g_initial_status == login_status_) {
62 return login_status_; 66 return login_status_;
63 } 67 }
64 68
65 // At new user image screen manager->IsUserLoggedIn() would return true 69 // At new user image screen manager->IsUserLoggedIn() would return true
66 // but there's no browser session available yet so use SessionStarted(). 70 // but there's no browser session available yet so use SessionStarted().
67 SessionStateDelegate* delegate = WmShell::Get()->GetSessionStateDelegate(); 71 SessionStateDelegate* delegate = WmShell::Get()->GetSessionStateDelegate();
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
101 base::TimeDelta* session_length_limit) { 105 base::TimeDelta* session_length_limit) {
102 if (session_length_limit_set_) 106 if (session_length_limit_set_)
103 *session_length_limit = session_length_limit_; 107 *session_length_limit = session_length_limit_;
104 return session_length_limit_set_; 108 return session_length_limit_set_;
105 } 109 }
106 110
107 void TestSystemTrayDelegate::SignOut() { 111 void TestSystemTrayDelegate::SignOut() {
108 base::MessageLoop::current()->QuitWhenIdle(); 112 base::MessageLoop::current()->QuitWhenIdle();
109 } 113 }
110 114
115 void TestSystemTrayDelegate::GetCurrentIME(IMEInfo* info) {
116 info->id = current_ime_.id;
117 info->name = current_ime_.name;
118 info->medium_name = current_ime_.medium_name;
119 info->short_name = current_ime_.short_name;
120 info->third_party = current_ime_.third_party;
121 }
122
111 } // namespace test 123 } // namespace test
112 } // namespace ash 124 } // namespace ash
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698