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

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

Issue 2923083002: chromeos: Convert system tray session length limit to mojo (Closed)
Patch Set: rebase Created 3 years, 6 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/system/tray/system_tray_notifier.cc ('k') | ash/test/test_system_tray_delegate.cc » ('j') | 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 #ifndef ASH_TEST_TEST_SYSTEM_TRAY_DELEGATE_H_ 5 #ifndef ASH_TEST_TEST_SYSTEM_TRAY_DELEGATE_H_
6 #define ASH_TEST_TEST_SYSTEM_TRAY_DELEGATE_H_ 6 #define ASH_TEST_TEST_SYSTEM_TRAY_DELEGATE_H_
7 7
8 #include "ash/system/tray/ime_info.h" 8 #include "ash/system/tray/ime_info.h"
9 #include "ash/system/tray/system_tray_delegate.h" 9 #include "ash/system/tray/system_tray_delegate.h"
10 #include "base/macros.h" 10 #include "base/macros.h"
11 #include "base/time/time.h"
12 11
13 namespace ash { 12 namespace ash {
14 namespace test { 13 namespace test {
15 14
16 class TestSystemTrayDelegate : public SystemTrayDelegate { 15 class TestSystemTrayDelegate : public SystemTrayDelegate {
17 public: 16 public:
18 TestSystemTrayDelegate(); 17 TestSystemTrayDelegate();
19 ~TestSystemTrayDelegate() override; 18 ~TestSystemTrayDelegate() override;
20 19
21 // Updates the session length limit so that the limit will come from now in
22 // |new_limit|.
23 void SetSessionLengthLimitForTest(const base::TimeDelta& new_limit);
24
25 // Clears the session length limit.
26 void ClearSessionLengthLimit();
27
28 // Sets the IME info. 20 // Sets the IME info.
29 void SetCurrentIME(const IMEInfo& info); 21 void SetCurrentIME(const IMEInfo& info);
30 22
31 // Sets the list of available IMEs. 23 // Sets the list of available IMEs.
32 void SetAvailableIMEList(const IMEInfoList& list); 24 void SetAvailableIMEList(const IMEInfoList& list);
33 25
34 // SystemTrayDelegate: 26 // SystemTrayDelegate:
35 bool GetSessionStartTime(base::TimeTicks* session_start_time) override;
36 bool GetSessionLengthLimit(base::TimeDelta* session_length_limit) override;
37 void GetCurrentIME(IMEInfo* info) override; 27 void GetCurrentIME(IMEInfo* info) override;
38 void GetAvailableIMEList(IMEInfoList* list) override; 28 void GetAvailableIMEList(IMEInfoList* list) override;
39 29
40 private: 30 private:
41 base::TimeDelta session_length_limit_;
42 bool session_length_limit_set_ = false;
43 IMEInfo current_ime_; 31 IMEInfo current_ime_;
44 IMEInfoList ime_list_; 32 IMEInfoList ime_list_;
45 33
46 DISALLOW_COPY_AND_ASSIGN(TestSystemTrayDelegate); 34 DISALLOW_COPY_AND_ASSIGN(TestSystemTrayDelegate);
47 }; 35 };
48 36
49 } // namespace test 37 } // namespace test
50 } // namespace ash 38 } // namespace ash
51 39
52 #endif // ASH_TEST_TEST_SYSTEM_TRAY_DELEGATE_H_ 40 #endif // ASH_TEST_TEST_SYSTEM_TRAY_DELEGATE_H_
OLDNEW
« no previous file with comments | « ash/system/tray/system_tray_notifier.cc ('k') | ash/test/test_system_tray_delegate.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698