| 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/shell.h" | 10 #include "ash/shell.h" |
| (...skipping 409 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 420 | 420 |
| 421 bool WebNotificationTray::ShowNotifierSettings() { | 421 bool WebNotificationTray::ShowNotifierSettings() { |
| 422 if (message_center_bubble()) { | 422 if (message_center_bubble()) { |
| 423 static_cast<message_center::MessageCenterBubble*>( | 423 static_cast<message_center::MessageCenterBubble*>( |
| 424 message_center_bubble()->bubble())->SetSettingsVisible(); | 424 message_center_bubble()->bubble())->SetSettingsVisible(); |
| 425 return true; | 425 return true; |
| 426 } | 426 } |
| 427 return ShowMessageCenterInternal(true /* show_settings */); | 427 return ShowMessageCenterInternal(true /* show_settings */); |
| 428 } | 428 } |
| 429 | 429 |
| 430 message_center::MessageCenterTray* WebNotificationTray::GetMessageCenterTray() { |
| 431 return message_center_tray_.get(); |
| 432 } |
| 433 |
| 430 bool WebNotificationTray::IsPressed() { | 434 bool WebNotificationTray::IsPressed() { |
| 431 return IsMessageCenterBubbleVisible(); | 435 return IsMessageCenterBubbleVisible(); |
| 432 } | 436 } |
| 433 | 437 |
| 434 void WebNotificationTray::ButtonPressed(views::Button* sender, | 438 void WebNotificationTray::ButtonPressed(views::Button* sender, |
| 435 const ui::Event& event) { | 439 const ui::Event& event) { |
| 436 DCHECK_EQ(button_, sender); | 440 DCHECK_EQ(button_, sender); |
| 437 PerformAction(event); | 441 PerformAction(event); |
| 438 } | 442 } |
| 439 | 443 |
| (...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 487 | 491 |
| 488 message_center::MessageCenterBubble* | 492 message_center::MessageCenterBubble* |
| 489 WebNotificationTray::GetMessageCenterBubbleForTest() { | 493 WebNotificationTray::GetMessageCenterBubbleForTest() { |
| 490 if (!message_center_bubble()) | 494 if (!message_center_bubble()) |
| 491 return NULL; | 495 return NULL; |
| 492 return static_cast<message_center::MessageCenterBubble*>( | 496 return static_cast<message_center::MessageCenterBubble*>( |
| 493 message_center_bubble()->bubble()); | 497 message_center_bubble()->bubble()); |
| 494 } | 498 } |
| 495 | 499 |
| 496 } // namespace ash | 500 } // namespace ash |
| OLD | NEW |