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 312 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
323 case SHELF_ALIGNMENT_RIGHT: { | 323 case SHELF_ALIGNMENT_RIGHT: { |
324 // Assume that the bottom line of the status area widget and the bubble | 324 // Assume that the bottom line of the status area widget and the bubble |
325 // are aligned. | 325 // are aligned. |
326 max_height = status_area_window->GetBoundsInRootWindow().bottom(); | 326 max_height = status_area_window->GetBoundsInRootWindow().bottom(); |
327 break; | 327 break; |
328 } | 328 } |
329 default: | 329 default: |
330 NOTREACHED(); | 330 NOTREACHED(); |
331 } | 331 } |
332 | 332 |
333 message_center_bubble->SetMaxHeight(std::max(0, max_height - kTraySpacing)); | 333 message_center_bubble->SetMaxHeight(std::max(0, |
| 334 max_height - GetTraySpacing())); |
334 if (show_settings) | 335 if (show_settings) |
335 message_center_bubble->SetSettingsVisible(); | 336 message_center_bubble->SetSettingsVisible(); |
336 message_center_bubble_.reset( | 337 message_center_bubble_.reset( |
337 new internal::WebNotificationBubbleWrapper(this, message_center_bubble)); | 338 new internal::WebNotificationBubbleWrapper(this, message_center_bubble)); |
338 | 339 |
339 status_area_widget()->SetHideSystemNotifications(true); | 340 status_area_widget()->SetHideSystemNotifications(true); |
340 GetShelfLayoutManager()->UpdateAutoHideState(); | 341 GetShelfLayoutManager()->UpdateAutoHideState(); |
341 button_->SetBubbleVisible(true); | 342 button_->SetBubbleVisible(true); |
342 return true; | 343 return true; |
343 } | 344 } |
(...skipping 258 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
602 | 603 |
603 message_center::MessageCenterBubble* | 604 message_center::MessageCenterBubble* |
604 WebNotificationTray::GetMessageCenterBubbleForTest() { | 605 WebNotificationTray::GetMessageCenterBubbleForTest() { |
605 if (!message_center_bubble()) | 606 if (!message_center_bubble()) |
606 return NULL; | 607 return NULL; |
607 return static_cast<message_center::MessageCenterBubble*>( | 608 return static_cast<message_center::MessageCenterBubble*>( |
608 message_center_bubble()->bubble()); | 609 message_center_bubble()->bubble()); |
609 } | 610 } |
610 | 611 |
611 } // namespace ash | 612 } // namespace ash |
OLD | NEW |