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 254 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
598 | 599 |
599 message_center::MessageCenterBubble* | 600 message_center::MessageCenterBubble* |
600 WebNotificationTray::GetMessageCenterBubbleForTest() { | 601 WebNotificationTray::GetMessageCenterBubbleForTest() { |
601 if (!message_center_bubble()) | 602 if (!message_center_bubble()) |
602 return NULL; | 603 return NULL; |
603 return static_cast<message_center::MessageCenterBubble*>( | 604 return static_cast<message_center::MessageCenterBubble*>( |
604 message_center_bubble()->bubble()); | 605 message_center_bubble()->bubble()); |
605 } | 606 } |
606 | 607 |
607 } // namespace ash | 608 } // namespace ash |
OLD | NEW |