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 TestSystemTrayItem(); | |
17 explicit TestSystemTrayItem(SystemTrayItem::UmaType uma_type); | |
18 ~TestSystemTrayItem() override; | |
19 | |
20 void set_has_views(bool has_views) { has_views_ = has_views; } | |
James Cook
2016/07/21 16:14:00
nit: Document (either by constructor or class comm
bruthig
2016/07/21 17:24:25
Done.
| |
21 void set_views_are_visible(bool visible) { views_are_visible_ = visible; } | |
22 | |
23 views::View* tray_view() const { return tray_view_; } | |
24 views::View* default_view() const { return default_view_; } | |
25 views::View* detailed_view() const { return detailed_view_; } | |
26 views::View* notification_view() const { return notification_view_; } | |
27 | |
28 // SystemTrayItem: | |
29 views::View* CreateTrayView(LoginStatus status) override; | |
30 views::View* CreateDefaultView(LoginStatus status) override; | |
31 views::View* CreateDetailedView(LoginStatus status) override; | |
32 views::View* CreateNotificationView(LoginStatus status) override; | |
33 void DestroyTrayView() override; | |
34 void DestroyDefaultView() override; | |
35 void DestroyDetailedView() override; | |
36 void DestroyNotificationView() override; | |
37 void UpdateAfterLoginStatusChange(LoginStatus status) override; | |
38 | |
39 private: | |
40 bool has_views_; | |
41 bool views_are_visible_; | |
42 views::View* tray_view_; | |
43 views::View* default_view_; | |
44 views::View* detailed_view_; | |
45 views::View* notification_view_; | |
46 | |
47 DISALLOW_COPY_AND_ASSIGN(TestSystemTrayItem); | |
48 }; | |
49 | |
50 } // namespace test | |
51 } // namespace ash | |
52 | |
53 #endif // ASH_COMMON_SYSTEM_TRAY_TEST_TEST_SYSTEM_TRAY_ITEM_H_ | |
OLD | NEW |