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" |
11 #include "ash/common/wm_shell.h" | 11 #include "ash/common/wm_shell.h" |
12 #include "ash/shell.h" | 12 #include "ash/shell.h" |
13 #include "base/message_loop/message_loop.h" | 13 #include "base/message_loop/message_loop.h" |
14 #include "base/time/time.h" | 14 #include "base/time/time.h" |
15 | 15 |
16 #if defined(OS_CHROMEOS) | 16 #if defined(OS_CHROMEOS) |
17 #include "ash/system/chromeos/rotation/tray_rotation_lock.h" | 17 #include "ash/system/chromeos/rotation/tray_rotation_lock.h" |
18 #include "ash/system/chromeos/tray_display.h" | |
19 #include "base/memory/ptr_util.h" | 18 #include "base/memory/ptr_util.h" |
20 #else | 19 #else |
21 #include "ash/common/system/tray/system_tray_item.h" | 20 #include "ash/common/system/tray/system_tray_item.h" |
22 #endif | 21 #endif |
23 | 22 |
24 namespace ash { | 23 namespace ash { |
25 namespace test { | 24 namespace test { |
26 | 25 |
27 namespace { | 26 namespace { |
28 | 27 |
(...skipping 88 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
117 base::TimeDelta* session_length_limit) { | 116 base::TimeDelta* session_length_limit) { |
118 if (session_length_limit_set_) | 117 if (session_length_limit_set_) |
119 *session_length_limit = session_length_limit_; | 118 *session_length_limit = session_length_limit_; |
120 return session_length_limit_set_; | 119 return session_length_limit_set_; |
121 } | 120 } |
122 | 121 |
123 void TestSystemTrayDelegate::SignOut() { | 122 void TestSystemTrayDelegate::SignOut() { |
124 base::MessageLoop::current()->QuitWhenIdle(); | 123 base::MessageLoop::current()->QuitWhenIdle(); |
125 } | 124 } |
126 | 125 |
127 std::unique_ptr<SystemTrayItem> TestSystemTrayDelegate::CreateDisplayTrayItem( | |
128 SystemTray* tray) { | |
129 #if defined(OS_CHROMEOS) | |
130 return base::MakeUnique<TrayDisplay>(tray); | |
131 #else | |
132 return nullptr; | |
133 #endif | |
134 } | |
135 | |
136 std::unique_ptr<SystemTrayItem> | 126 std::unique_ptr<SystemTrayItem> |
137 TestSystemTrayDelegate::CreateRotationLockTrayItem(SystemTray* tray) { | 127 TestSystemTrayDelegate::CreateRotationLockTrayItem(SystemTray* tray) { |
138 #if defined(OS_CHROMEOS) | 128 #if defined(OS_CHROMEOS) |
139 return base::MakeUnique<TrayRotationLock>(tray); | 129 return base::MakeUnique<TrayRotationLock>(tray); |
140 #else | 130 #else |
141 return nullptr; | 131 return nullptr; |
142 #endif | 132 #endif |
143 } | 133 } |
144 | 134 |
145 void TestSystemTrayDelegate::GetCurrentIME(IMEInfo* info) { | 135 void TestSystemTrayDelegate::GetCurrentIME(IMEInfo* info) { |
146 *info = current_ime_; | 136 *info = current_ime_; |
147 } | 137 } |
148 | 138 |
149 void TestSystemTrayDelegate::GetAvailableIMEList(IMEInfoList* list) { | 139 void TestSystemTrayDelegate::GetAvailableIMEList(IMEInfoList* list) { |
150 *list = ime_list_; | 140 *list = ime_list_; |
151 } | 141 } |
152 | 142 |
153 } // namespace test | 143 } // namespace test |
154 } // namespace ash | 144 } // namespace ash |
OLD | NEW |