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

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

Issue 2583393002: Send notification to users upon receiving sms messages (Closed)
Patch Set: Created 3 years, 11 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 #include "ash/test/test_system_tray_item.h" 5 #include "ash/test/test_system_tray_item.h"
6 6
7 #include "ash/test/ash_test_base.h" 7 #include "ash/test/ash_test_base.h"
8 #include "base/strings/utf_string_conversions.h" 8 #include "base/strings/utf_string_conversions.h"
9 #include "ui/views/controls/label.h" 9 #include "ui/views/controls/label.h"
10 #include "ui/views/layout/fill_layout.h" 10 #include "ui/views/layout/fill_layout.h"
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after
56 detailed_view_ = nullptr; 56 detailed_view_ = nullptr;
57 return detailed_view_; 57 return detailed_view_;
58 } 58 }
59 detailed_view_ = new views::View; 59 detailed_view_ = new views::View;
60 detailed_view_->SetLayoutManager(new views::FillLayout); 60 detailed_view_->SetLayoutManager(new views::FillLayout);
61 detailed_view_->AddChildView(new views::Label(base::UTF8ToUTF16("Detailed"))); 61 detailed_view_->AddChildView(new views::Label(base::UTF8ToUTF16("Detailed")));
62 detailed_view_->SetVisible(views_are_visible_); 62 detailed_view_->SetVisible(views_are_visible_);
63 return detailed_view_; 63 return detailed_view_;
64 } 64 }
65 65
66 views::View* TestSystemTrayItem::CreateNotificationView(LoginStatus status) {
67 if (!has_views_) {
68 notification_view_ = nullptr;
69 return notification_view_;
70 }
71 notification_view_ = new views::View;
72 notification_view_->SetVisible(views_are_visible_);
73 return notification_view_;
74 }
75
76 void TestSystemTrayItem::DestroyTrayView() { 66 void TestSystemTrayItem::DestroyTrayView() {
77 tray_view_ = nullptr; 67 tray_view_ = nullptr;
78 } 68 }
79 69
80 void TestSystemTrayItem::DestroyDefaultView() { 70 void TestSystemTrayItem::DestroyDefaultView() {
81 default_view_ = nullptr; 71 default_view_ = nullptr;
82 } 72 }
83 73
84 void TestSystemTrayItem::DestroyDetailedView() { 74 void TestSystemTrayItem::DestroyDetailedView() {
85 detailed_view_ = nullptr; 75 detailed_view_ = nullptr;
86 } 76 }
87 77
88 void TestSystemTrayItem::DestroyNotificationView() { 78 void TestSystemTrayItem::DestroyNotificationView() {
89 notification_view_ = nullptr; 79 notification_view_ = nullptr;
90 } 80 }
91 81
92 void TestSystemTrayItem::UpdateAfterLoginStatusChange(LoginStatus status) {} 82 void TestSystemTrayItem::UpdateAfterLoginStatusChange(LoginStatus status) {}
93 83
94 } // namespace test 84 } // namespace test
95 } // namespace ash 85 } // namespace ash
OLDNEW
« ash/common/system/tray/tray_notification_view.cc ('K') | « ash/test/test_system_tray_item.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698