| 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/shelf_layout_manager.h" | 10 #include "ash/common/shelf/shelf_layout_manager.h" |
| (...skipping 122 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 133 GetMessageCenter()->RemoveNotification(id, false); | 133 GetMessageCenter()->RemoveNotification(id, false); |
| 134 } | 134 } |
| 135 | 135 |
| 136 views::Widget* GetWidget() { return GetTray()->GetWidget(); } | 136 views::Widget* GetWidget() { return GetTray()->GetWidget(); } |
| 137 | 137 |
| 138 int GetPopupWorkAreaBottom() { | 138 int GetPopupWorkAreaBottom() { |
| 139 return GetPopupWorkAreaBottomForTray(GetTray()); | 139 return GetPopupWorkAreaBottomForTray(GetTray()); |
| 140 } | 140 } |
| 141 | 141 |
| 142 int GetPopupWorkAreaBottomForTray(WebNotificationTray* tray) { | 142 int GetPopupWorkAreaBottomForTray(WebNotificationTray* tray) { |
| 143 return tray->popup_alignment_delegate_->GetWorkAreaBottom(); | 143 return tray->popup_alignment_delegate_->GetWorkArea().bottom(); |
| 144 } | 144 } |
| 145 | 145 |
| 146 bool IsPopupVisible() { return GetTray()->IsPopupVisible(); } | 146 bool IsPopupVisible() { return GetTray()->IsPopupVisible(); } |
| 147 | 147 |
| 148 static std::unique_ptr<views::Widget> CreateTestWidget() { | 148 static std::unique_ptr<views::Widget> CreateTestWidget() { |
| 149 return AshTestBase::CreateTestWidget( | 149 return AshTestBase::CreateTestWidget( |
| 150 nullptr, kShellWindowId_DefaultContainer, gfx::Rect(1, 2, 3, 4)); | 150 nullptr, kShellWindowId_DefaultContainer, gfx::Rect(1, 2, 3, 4)); |
| 151 } | 151 } |
| 152 | 152 |
| 153 static void UpdateAutoHideStateNow() { | 153 static void UpdateAutoHideStateNow() { |
| (...skipping 361 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 515 EXPECT_FALSE(tray->draw_background_as_active()); | 515 EXPECT_FALSE(tray->draw_background_as_active()); |
| 516 | 516 |
| 517 generator.ReleaseTouch(); | 517 generator.ReleaseTouch(); |
| 518 EXPECT_FALSE(tray->draw_background_as_active()); | 518 EXPECT_FALSE(tray->draw_background_as_active()); |
| 519 EXPECT_FALSE(tray->IsMessageCenterBubbleVisible()); | 519 EXPECT_FALSE(tray->IsMessageCenterBubbleVisible()); |
| 520 } | 520 } |
| 521 | 521 |
| 522 #endif // OS_CHROMEOS | 522 #endif // OS_CHROMEOS |
| 523 | 523 |
| 524 } // namespace ash | 524 } // namespace ash |
| OLD | NEW |