Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(334)

Unified Diff: ash/system/web_notification/web_notification_tray.h

Issue 10878068: Replace Ash web notification tray view with a button. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: ash/system/web_notification/web_notification_tray.h
diff --git a/ash/system/web_notification/web_notification_tray.h b/ash/system/web_notification/web_notification_tray.h
index 1cfdab14f90b770adb8dd62d5bbbc58dad366c1b..b76a7143a14d110781b72d61c0d0face61e43bb5 100644
--- a/ash/system/web_notification/web_notification_tray.h
+++ b/ash/system/web_notification/web_notification_tray.h
@@ -20,7 +20,7 @@ class ImageSkia;
}
namespace views {
-class Label;
+class ImageButton;
}
namespace ash {
@@ -43,7 +43,8 @@ class WebNotificationView;
// generated by SystemTrayItem). Visibility of one notification type or other
// is controlled by StatusAreaWidget.
-class ASH_EXPORT WebNotificationTray : public internal::TrayBackgroundView {
+class ASH_EXPORT WebNotificationTray : public internal::TrayBackgroundView,
+ public views::ButtonListener {
public:
class Delegate {
public:
@@ -121,6 +122,10 @@ class ASH_EXPORT WebNotificationTray : public internal::TrayBackgroundView {
// Overridden from internal::ActionableView.
virtual bool PerformAction(const ui::Event& event) OVERRIDE;
+ // Overridden from ButtonListener.
+ virtual void ButtonPressed(views::Button* sender,
+ const ui::Event& event) OVERRIDE;
+
// Constants exposed for unit tests:
static const size_t kMaxVisibleTrayNotifications;
static const size_t kMaxVisiblePopupNotifications;
@@ -155,6 +160,9 @@ class ASH_EXPORT WebNotificationTray : public internal::TrayBackgroundView {
// Called when a notification is clicked on. Event is passed to the Delegate.
void OnClicked(const std::string& id);
+ // Shows or hides the message center bubble.
+ void ToggleMessageCenterBubble();
+
// Shows or updates the message center bubble and hides the popup bubble.
void ShowMessageCenterBubble();
@@ -194,7 +202,7 @@ class ASH_EXPORT WebNotificationTray : public internal::TrayBackgroundView {
scoped_ptr<internal::WebNotificationList> notification_list_;
scoped_ptr<MessageCenterBubble> message_center_bubble_;
scoped_ptr<PopupBubble> popup_bubble_;
- views::Label* count_label_;
+ views::ImageButton* button_;
Delegate* delegate_;
bool show_message_center_on_unlock_;

Powered by Google App Engine
This is Rietveld 408576698