| 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/system/web_notification/web_notification_tray.h" | 5 #include "ash/system/web_notification/web_notification_tray.h" |
| 6 | 6 |
| 7 #include "ash/ash_switches.h" | 7 #include "ash/ash_switches.h" |
| 8 #include "ash/root_window_controller.h" | 8 #include "ash/root_window_controller.h" |
| 9 #include "ash/shelf/shelf_layout_manager.h" | 9 #include "ash/shelf/shelf_layout_manager.h" |
| 10 #include "ash/shelf/shelf_layout_manager_observer.h" | 10 #include "ash/shelf/shelf_layout_manager_observer.h" |
| (...skipping 267 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 278 show_message_center_on_unlock_ = false; | 278 show_message_center_on_unlock_ = false; |
| 279 status_area_widget()->SetHideSystemNotifications(false); | 279 status_area_widget()->SetHideSystemNotifications(false); |
| 280 GetShelfLayoutManager()->UpdateAutoHideState(); | 280 GetShelfLayoutManager()->UpdateAutoHideState(); |
| 281 button_->SetBubbleVisible(false); | 281 button_->SetBubbleVisible(false); |
| 282 } | 282 } |
| 283 | 283 |
| 284 void WebNotificationTray::SetSystemTrayHeight(int height) { | 284 void WebNotificationTray::SetSystemTrayHeight(int height) { |
| 285 popup_alignment_delegate_->SetSystemTrayHeight(height); | 285 popup_alignment_delegate_->SetSystemTrayHeight(height); |
| 286 } | 286 } |
| 287 | 287 |
| 288 int WebNotificationTray::system_tray_height_for_test() const { |
| 289 return popup_alignment_delegate_->system_tray_height_for_test(); |
| 290 } |
| 291 |
| 288 bool WebNotificationTray::ShowPopups() { | 292 bool WebNotificationTray::ShowPopups() { |
| 289 if (message_center_bubble()) | 293 if (message_center_bubble()) |
| 290 return false; | 294 return false; |
| 291 | 295 |
| 292 popup_collection_->DoUpdateIfPossible(); | 296 popup_collection_->DoUpdateIfPossible(); |
| 293 return true; | 297 return true; |
| 294 } | 298 } |
| 295 | 299 |
| 296 void WebNotificationTray::HidePopups() { | 300 void WebNotificationTray::HidePopups() { |
| 297 DCHECK(popup_collection_.get()); | 301 DCHECK(popup_collection_.get()); |
| (...skipping 205 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 503 | 507 |
| 504 message_center::MessageCenterBubble* | 508 message_center::MessageCenterBubble* |
| 505 WebNotificationTray::GetMessageCenterBubbleForTest() { | 509 WebNotificationTray::GetMessageCenterBubbleForTest() { |
| 506 if (!message_center_bubble()) | 510 if (!message_center_bubble()) |
| 507 return NULL; | 511 return NULL; |
| 508 return static_cast<message_center::MessageCenterBubble*>( | 512 return static_cast<message_center::MessageCenterBubble*>( |
| 509 message_center_bubble()->bubble()); | 513 message_center_bubble()->bubble()); |
| 510 } | 514 } |
| 511 | 515 |
| 512 } // namespace ash | 516 } // namespace ash |
| OLD | NEW |