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/common/system/web_notification/web_notification_tray.h" | 5 #include "ash/common/system/web_notification/web_notification_tray.h" |
6 | 6 |
7 #include "ash/common/ash_switches.h" | 7 #include "ash/common/ash_switches.h" |
8 #include "ash/common/material_design/material_design_controller.h" | 8 #include "ash/common/material_design/material_design_controller.h" |
9 #include "ash/common/session/session_state_delegate.h" | 9 #include "ash/common/session/session_state_delegate.h" |
10 #include "ash/common/shelf/shelf_constants.h" | 10 #include "ash/common/shelf/shelf_constants.h" |
(...skipping 432 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
443 return false; | 443 return false; |
444 return message_center()->IsQuietMode(); | 444 return message_center()->IsQuietMode(); |
445 } | 445 } |
446 | 446 |
447 bool WebNotificationTray::IsCommandIdEnabled(int command_id) const { | 447 bool WebNotificationTray::IsCommandIdEnabled(int command_id) const { |
448 return true; | 448 return true; |
449 } | 449 } |
450 | 450 |
451 bool WebNotificationTray::GetAcceleratorForCommandId( | 451 bool WebNotificationTray::GetAcceleratorForCommandId( |
452 int command_id, | 452 int command_id, |
453 ui::Accelerator* accelerator) { | 453 ui::Accelerator* accelerator) const { |
454 return false; | 454 return false; |
455 } | 455 } |
456 | 456 |
457 void WebNotificationTray::ExecuteCommand(int command_id, int event_flags) { | 457 void WebNotificationTray::ExecuteCommand(int command_id, int event_flags) { |
458 if (command_id == kToggleQuietMode) { | 458 if (command_id == kToggleQuietMode) { |
459 bool in_quiet_mode = message_center()->IsQuietMode(); | 459 bool in_quiet_mode = message_center()->IsQuietMode(); |
460 message_center()->SetQuietMode(!in_quiet_mode); | 460 message_center()->SetQuietMode(!in_quiet_mode); |
461 return; | 461 return; |
462 } | 462 } |
463 base::TimeDelta expires_in = command_id == kEnableQuietModeDay | 463 base::TimeDelta expires_in = command_id == kEnableQuietModeDay |
(...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
530 | 530 |
531 message_center::MessageCenterBubble* | 531 message_center::MessageCenterBubble* |
532 WebNotificationTray::GetMessageCenterBubbleForTest() { | 532 WebNotificationTray::GetMessageCenterBubbleForTest() { |
533 if (!message_center_bubble()) | 533 if (!message_center_bubble()) |
534 return NULL; | 534 return NULL; |
535 return static_cast<message_center::MessageCenterBubble*>( | 535 return static_cast<message_center::MessageCenterBubble*>( |
536 message_center_bubble()->bubble()); | 536 message_center_bubble()->bubble()); |
537 } | 537 } |
538 | 538 |
539 } // namespace ash | 539 } // namespace ash |
OLD | NEW |