OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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/common/system/web_notification/web_notification_tray.h" | 5 #include "ash/common/system/web_notification/web_notification_tray.h" |
6 | 6 |
7 #include <utility> | 7 #include <utility> |
8 #include <vector> | 8 #include <vector> |
9 | 9 |
10 #include "ash/common/shelf/wm_shelf.h" | 10 #include "ash/common/shelf/wm_shelf.h" |
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
63 return GetTray()->message_center(); | 63 return GetTray()->message_center(); |
64 } | 64 } |
65 | 65 |
66 SystemTray* GetSystemTray() { | 66 SystemTray* GetSystemTray() { |
67 return StatusAreaWidgetTestHelper::GetStatusAreaWidget()->system_tray(); | 67 return StatusAreaWidgetTestHelper::GetStatusAreaWidget()->system_tray(); |
68 } | 68 } |
69 | 69 |
70 // Trivial item implementation for testing PopupAndSystemTray test case. | 70 // Trivial item implementation for testing PopupAndSystemTray test case. |
71 class TestItem : public SystemTrayItem { | 71 class TestItem : public SystemTrayItem { |
72 public: | 72 public: |
73 TestItem() : SystemTrayItem(GetSystemTray()) {} | 73 TestItem() : SystemTrayItem(GetSystemTray(), UMA_TEST) {} |
74 | 74 |
75 views::View* CreateDefaultView(LoginStatus status) override { | 75 views::View* CreateDefaultView(LoginStatus status) override { |
76 views::View* default_view = new views::View; | 76 views::View* default_view = new views::View; |
77 default_view->SetLayoutManager(new views::FillLayout); | 77 default_view->SetLayoutManager(new views::FillLayout); |
78 default_view->AddChildView(new views::Label(base::UTF8ToUTF16("Default"))); | 78 default_view->AddChildView(new views::Label(base::UTF8ToUTF16("Default"))); |
79 return default_view; | 79 return default_view; |
80 } | 80 } |
81 | 81 |
82 views::View* CreateNotificationView(LoginStatus status) override { | 82 views::View* CreateNotificationView(LoginStatus status) override { |
83 return new views::View; | 83 return new views::View; |
(...skipping 449 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
533 ui::ET_TOUCH_RELEASED, out_of_bounds, touch_id, | 533 ui::ET_TOUCH_RELEASED, out_of_bounds, touch_id, |
534 move.time_stamp() + base::TimeDelta::FromMilliseconds(50)); | 534 move.time_stamp() + base::TimeDelta::FromMilliseconds(50)); |
535 generator.Dispatch(&release); | 535 generator.Dispatch(&release); |
536 EXPECT_FALSE(tray->draw_background_as_active()); | 536 EXPECT_FALSE(tray->draw_background_as_active()); |
537 EXPECT_FALSE(tray->IsMessageCenterBubbleVisible()); | 537 EXPECT_FALSE(tray->IsMessageCenterBubbleVisible()); |
538 } | 538 } |
539 | 539 |
540 #endif // OS_CHROMEOS | 540 #endif // OS_CHROMEOS |
541 | 541 |
542 } // namespace ash | 542 } // namespace ash |
OLD | NEW |