OLD | NEW |
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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 // Draws the view for the balloons. | 5 // Draws the view for the balloons. |
6 | 6 |
7 #include "chrome/browser/chromeos/notifications/notification_panel.h" | 7 #include "chrome/browser/chromeos/notifications/notification_panel.h" |
8 | 8 |
9 #include <algorithm> | 9 #include <algorithm> |
10 | 10 |
(...skipping 592 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
603 // PanelController overrides. | 603 // PanelController overrides. |
604 | 604 |
605 string16 NotificationPanel::GetPanelTitle() { | 605 string16 NotificationPanel::GetPanelTitle() { |
606 return string16(l10n_util::GetStringUTF16(IDS_NOTIFICATION_PANEL_TITLE)); | 606 return string16(l10n_util::GetStringUTF16(IDS_NOTIFICATION_PANEL_TITLE)); |
607 } | 607 } |
608 | 608 |
609 SkBitmap NotificationPanel::GetPanelIcon() { | 609 SkBitmap NotificationPanel::GetPanelIcon() { |
610 return SkBitmap(); | 610 return SkBitmap(); |
611 } | 611 } |
612 | 612 |
| 613 bool NotificationPanel::CanClosePanel() { |
| 614 return true; |
| 615 } |
| 616 |
613 void NotificationPanel::ClosePanel() { | 617 void NotificationPanel::ClosePanel() { |
614 SET_STATE(CLOSED); | 618 SET_STATE(CLOSED); |
615 UpdatePanel(false); | 619 UpdatePanel(false); |
616 } | 620 } |
617 | 621 |
618 //////////////////////////////////////////////////////////////////////////////// | 622 //////////////////////////////////////////////////////////////////////////////// |
619 // NotificationObserver overrides. | 623 // NotificationObserver overrides. |
620 | 624 |
621 void NotificationPanel::Observe(NotificationType type, | 625 void NotificationPanel::Observe(NotificationType type, |
622 const NotificationSource& source, | 626 const NotificationSource& source, |
(...skipping 241 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
864 &origin); | 868 &origin); |
865 return rect.Contains(gfx::Rect(origin, view->bounds().size())); | 869 return rect.Contains(gfx::Rect(origin, view->bounds().size())); |
866 } | 870 } |
867 | 871 |
868 | 872 |
869 bool NotificationPanelTester::IsActive(const BalloonViewImpl* view) const { | 873 bool NotificationPanelTester::IsActive(const BalloonViewImpl* view) const { |
870 return panel_->active_ == view; | 874 return panel_->active_ == view; |
871 } | 875 } |
872 | 876 |
873 } // namespace chromeos | 877 } // namespace chromeos |
OLD | NEW |