| 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 #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/common/system/tray/default_system_tray_delegate.h" | 8 #include "ash/common/system/tray/default_system_tray_delegate.h" |
| 9 #include "ash/common/system/tray/system_tray_delegate.h" |
| 9 #include "base/macros.h" | 10 #include "base/macros.h" |
| 10 #include "base/time/time.h" | 11 #include "base/time/time.h" |
| 11 | 12 |
| 12 namespace ash { | 13 namespace ash { |
| 13 namespace test { | 14 namespace test { |
| 14 | 15 |
| 15 class TestSystemTrayDelegate : public DefaultSystemTrayDelegate { | 16 class TestSystemTrayDelegate : public DefaultSystemTrayDelegate { |
| 16 public: | 17 public: |
| 17 TestSystemTrayDelegate(); | 18 TestSystemTrayDelegate(); |
| 18 ~TestSystemTrayDelegate() override; | 19 ~TestSystemTrayDelegate() override; |
| (...skipping 21 matching lines...) Expand all Loading... |
| 40 should_show_display_notification_ = should_show; | 41 should_show_display_notification_ = should_show; |
| 41 } | 42 } |
| 42 | 43 |
| 43 // Updates the session length limit so that the limit will come from now in | 44 // Updates the session length limit so that the limit will come from now in |
| 44 // |new_limit|. | 45 // |new_limit|. |
| 45 void SetSessionLengthLimitForTest(const base::TimeDelta& new_limit); | 46 void SetSessionLengthLimitForTest(const base::TimeDelta& new_limit); |
| 46 | 47 |
| 47 // Clears the session length limit. | 48 // Clears the session length limit. |
| 48 void ClearSessionLengthLimit(); | 49 void ClearSessionLengthLimit(); |
| 49 | 50 |
| 51 // Sets the IME info. |
| 52 void SetCurrentIME(const IMEInfo& info); |
| 53 |
| 50 // Overridden from SystemTrayDelegate: | 54 // Overridden from SystemTrayDelegate: |
| 51 LoginStatus GetUserLoginStatus() const override; | 55 LoginStatus GetUserLoginStatus() const override; |
| 52 bool IsUserSupervised() const override; | 56 bool IsUserSupervised() const override; |
| 53 void GetSystemUpdateInfo(UpdateInfo* info) const override; | 57 void GetSystemUpdateInfo(UpdateInfo* info) const override; |
| 54 bool ShouldShowDisplayNotification() override; | 58 bool ShouldShowDisplayNotification() override; |
| 55 bool GetSessionStartTime(base::TimeTicks* session_start_time) override; | 59 bool GetSessionStartTime(base::TimeTicks* session_start_time) override; |
| 56 bool GetSessionLengthLimit(base::TimeDelta* session_length_limit) override; | 60 bool GetSessionLengthLimit(base::TimeDelta* session_length_limit) override; |
| 57 void SignOut() override; | 61 void SignOut() override; |
| 58 std::unique_ptr<SystemTrayItem> CreateDisplayTrayItem( | 62 std::unique_ptr<SystemTrayItem> CreateDisplayTrayItem( |
| 59 SystemTray* tray) override; | 63 SystemTray* tray) override; |
| 60 std::unique_ptr<SystemTrayItem> CreateRotationLockTrayItem( | 64 std::unique_ptr<SystemTrayItem> CreateRotationLockTrayItem( |
| 61 SystemTray* tray) override; | 65 SystemTray* tray) override; |
| 66 void GetCurrentIME(IMEInfo* info) override; |
| 62 | 67 |
| 63 private: | 68 private: |
| 64 bool should_show_display_notification_; | 69 bool should_show_display_notification_; |
| 65 LoginStatus login_status_; | 70 LoginStatus login_status_; |
| 66 base::TimeDelta session_length_limit_; | 71 base::TimeDelta session_length_limit_; |
| 67 bool session_length_limit_set_; | 72 bool session_length_limit_set_; |
| 73 IMEInfo current_ime_; |
| 68 | 74 |
| 69 DISALLOW_COPY_AND_ASSIGN(TestSystemTrayDelegate); | 75 DISALLOW_COPY_AND_ASSIGN(TestSystemTrayDelegate); |
| 70 }; | 76 }; |
| 71 | 77 |
| 72 } // namespace test | 78 } // namespace test |
| 73 } // namespace ash | 79 } // namespace ash |
| 74 | 80 |
| 75 #endif // ASH_TEST_TEST_SYSTEM_TRAY_DELEGATE_H_ | 81 #endif // ASH_TEST_TEST_SYSTEM_TRAY_DELEGATE_H_ |
| OLD | NEW |