| 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 520 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 531 | 531 |
| 532 bool WebNotificationTray::ShowNotifierSettings() { | 532 bool WebNotificationTray::ShowNotifierSettings() { |
| 533 if (message_center_bubble()) { | 533 if (message_center_bubble()) { |
| 534 static_cast<message_center::MessageCenterBubble*>( | 534 static_cast<message_center::MessageCenterBubble*>( |
| 535 message_center_bubble()->bubble())->SetSettingsVisible(); | 535 message_center_bubble()->bubble())->SetSettingsVisible(); |
| 536 return true; | 536 return true; |
| 537 } | 537 } |
| 538 return ShowMessageCenterInternal(true /* show_settings */); | 538 return ShowMessageCenterInternal(true /* show_settings */); |
| 539 } | 539 } |
| 540 | 540 |
| 541 message_center::MessageCenterTray* WebNotificationTray::GetMessageCenterTray() { |
| 542 return message_center_tray_.get(); |
| 543 } |
| 544 |
| 541 bool WebNotificationTray::IsPressed() { | 545 bool WebNotificationTray::IsPressed() { |
| 542 return IsMessageCenterBubbleVisible(); | 546 return IsMessageCenterBubbleVisible(); |
| 543 } | 547 } |
| 544 | 548 |
| 545 void WebNotificationTray::ButtonPressed(views::Button* sender, | 549 void WebNotificationTray::ButtonPressed(views::Button* sender, |
| 546 const ui::Event& event) { | 550 const ui::Event& event) { |
| 547 DCHECK_EQ(button_, sender); | 551 DCHECK_EQ(button_, sender); |
| 548 PerformAction(event); | 552 PerformAction(event); |
| 549 } | 553 } |
| 550 | 554 |
| (...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 598 | 602 |
| 599 message_center::MessageCenterBubble* | 603 message_center::MessageCenterBubble* |
| 600 WebNotificationTray::GetMessageCenterBubbleForTest() { | 604 WebNotificationTray::GetMessageCenterBubbleForTest() { |
| 601 if (!message_center_bubble()) | 605 if (!message_center_bubble()) |
| 602 return NULL; | 606 return NULL; |
| 603 return static_cast<message_center::MessageCenterBubble*>( | 607 return static_cast<message_center::MessageCenterBubble*>( |
| 604 message_center_bubble()->bubble()); | 608 message_center_bubble()->bubble()); |
| 605 } | 609 } |
| 606 | 610 |
| 607 } // namespace ash | 611 } // namespace ash |
| OLD | NEW |