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

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

Issue 2583393002: Send notification to users upon receiving sms messages (Closed)
Patch Set: update return type Created 3 years, 10 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
OLDNEW
1 // Copyright 2016 The Chromium Authors. All rights reserved. 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 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_COMMON_SYSTEM_TRAY_TEST_TEST_SYSTEM_TRAY_ITEM_H_ 5 #ifndef ASH_COMMON_SYSTEM_TRAY_TEST_TEST_SYSTEM_TRAY_ITEM_H_
6 #define ASH_COMMON_SYSTEM_TRAY_TEST_TEST_SYSTEM_TRAY_ITEM_H_ 6 #define ASH_COMMON_SYSTEM_TRAY_TEST_TEST_SYSTEM_TRAY_ITEM_H_
7 7
8 #include "ash/common/system/tray/system_tray_item.h" 8 #include "ash/common/system/tray/system_tray_item.h"
9 9
10 namespace ash { 10 namespace ash {
11 namespace test { 11 namespace test {
12 12
13 // Trivial item implementation that tracks its views for testing. By default 13 // Trivial item implementation that tracks its views for testing. By default
14 // views are created and returned by the Create*View() methods and they are 14 // views are created and returned by the Create*View() methods and they are
15 // configured to be visible. Use set_has_views() and set_views_are_visible() to 15 // configured to be visible. Use set_has_views() and set_views_are_visible() to
16 // change this behavior. 16 // change this behavior.
17 class TestSystemTrayItem : public SystemTrayItem { 17 class TestSystemTrayItem : public SystemTrayItem {
18 public: 18 public:
19 TestSystemTrayItem(); 19 TestSystemTrayItem();
20 explicit TestSystemTrayItem(SystemTrayItem::UmaType uma_type); 20 explicit TestSystemTrayItem(SystemTrayItem::UmaType uma_type);
21 ~TestSystemTrayItem() override; 21 ~TestSystemTrayItem() override;
22 22
23 void set_has_views(bool has_views) { has_views_ = has_views; } 23 void set_has_views(bool has_views) { has_views_ = has_views; }
24 void set_views_are_visible(bool visible) { views_are_visible_ = visible; } 24 void set_views_are_visible(bool visible) { views_are_visible_ = visible; }
25 25
26 views::View* tray_view() const { return tray_view_; } 26 views::View* tray_view() const { return tray_view_; }
27 views::View* default_view() const { return default_view_; } 27 views::View* default_view() const { return default_view_; }
28 views::View* detailed_view() const { return detailed_view_; } 28 views::View* detailed_view() const { return detailed_view_; }
29 views::View* notification_view() const { return notification_view_; }
30 29
31 // SystemTrayItem: 30 // SystemTrayItem:
32 views::View* CreateTrayView(LoginStatus status) override; 31 views::View* CreateTrayView(LoginStatus status) override;
33 views::View* CreateDefaultView(LoginStatus status) override; 32 views::View* CreateDefaultView(LoginStatus status) override;
34 views::View* CreateDetailedView(LoginStatus status) override; 33 views::View* CreateDetailedView(LoginStatus status) override;
35 views::View* CreateNotificationView(LoginStatus status) override;
36 void DestroyTrayView() override; 34 void DestroyTrayView() override;
37 void DestroyDefaultView() override; 35 void DestroyDefaultView() override;
38 void DestroyDetailedView() override; 36 void DestroyDetailedView() override;
39 void DestroyNotificationView() override;
40 void UpdateAfterLoginStatusChange(LoginStatus status) override; 37 void UpdateAfterLoginStatusChange(LoginStatus status) override;
41 38
42 private: 39 private:
43 bool has_views_; 40 bool has_views_;
44 bool views_are_visible_; 41 bool views_are_visible_;
45 views::View* tray_view_; 42 views::View* tray_view_;
46 views::View* default_view_; 43 views::View* default_view_;
47 views::View* detailed_view_; 44 views::View* detailed_view_;
48 views::View* notification_view_;
49 45
50 DISALLOW_COPY_AND_ASSIGN(TestSystemTrayItem); 46 DISALLOW_COPY_AND_ASSIGN(TestSystemTrayItem);
51 }; 47 };
52 48
53 } // namespace test 49 } // namespace test
54 } // namespace ash 50 } // namespace ash
55 51
56 #endif // ASH_COMMON_SYSTEM_TRAY_TEST_TEST_SYSTEM_TRAY_ITEM_H_ 52 #endif // ASH_COMMON_SYSTEM_TRAY_TEST_TEST_SYSTEM_TRAY_ITEM_H_
OLDNEW
« no previous file with comments | « ash/system/web_notification/web_notification_tray_unittest.cc ('k') | ash/test/test_system_tray_item.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698