OLD | NEW |
---|---|
(Empty) | |
1 // Copyright 2016 The Chromium Authors. All rights reserved. | |
2 // Use of this source code is governed by a BSD-style license that can be | |
3 // found in the LICENSE file. | |
4 | |
5 #ifndef ASH_COMMON_SYSTEM_TRAY_TEST_TEST_SYSTEM_TRAY_ITEM_H_ | |
6 #define ASH_COMMON_SYSTEM_TRAY_TEST_TEST_SYSTEM_TRAY_ITEM_H_ | |
7 | |
8 #include "ash/common/system/tray/system_tray_item.h" | |
9 | |
10 namespace ash { | |
11 namespace test { | |
12 | |
13 // Trivial item implementation that tracks its views for testing. | |
14 class TestSystemTrayItem : public SystemTrayItem { | |
15 public: | |
16 explicit TestSystemTrayItem(bool has_views); | |
James Cook
2016/07/20 20:13:50
nit: Don't pass |has_views| in the constructor. Ma
bruthig
2016/07/21 14:34:58
Done.
| |
17 | |
James Cook
2016/07/20 20:13:49
~TestSystemTrayItem() override
bruthig
2016/07/21 14:34:58
Done.
| |
18 void set_has_views(bool has_views) { has_views_ = has_views; } | |
19 void set_views_are_visible(bool visible) { views_are_visible_ = visible; } | |
20 | |
21 views::View* tray_view() const { return tray_view_; } | |
22 views::View* default_view() const { return default_view_; } | |
23 views::View* detailed_view() const { return detailed_view_; } | |
24 views::View* notification_view() const { return notification_view_; } | |
25 | |
26 // SystemTrayItem: | |
27 views::View* CreateTrayView(LoginStatus status) override; | |
28 views::View* CreateDefaultView(LoginStatus status) override; | |
29 views::View* CreateDetailedView(LoginStatus status) override; | |
30 views::View* CreateNotificationView(LoginStatus status) override; | |
31 void DestroyTrayView() override; | |
32 void DestroyDefaultView() override; | |
33 void DestroyDetailedView() override; | |
34 void DestroyNotificationView() override; | |
35 void UpdateAfterLoginStatusChange(LoginStatus status) override; | |
36 | |
37 private: | |
38 bool has_views_; | |
39 bool views_are_visible_; | |
40 views::View* tray_view_; | |
41 views::View* default_view_; | |
42 views::View* detailed_view_; | |
43 views::View* notification_view_; | |
44 | |
45 DISALLOW_COPY_AND_ASSIGN(TestSystemTrayItem); | |
46 }; | |
47 | |
48 } // namespace test | |
49 } // namespace ash | |
50 | |
51 #endif // ASH_COMMON_SYSTEM_TRAY_TEST_TEST_SYSTEM_TRAY_ITEM_H_ | |
OLD | NEW |