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

Side by Side Diff: chrome/browser/ui/views/message_center/web_notification_tray.h

Issue 17286015: Adds a first-run balloon to the Windows notification center. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 6 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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 #ifndef CHROME_BROWSER_UI_VIEWS_MESSAGE_CENTER_WEB_NOTIFICATION_TRAY_H_ 5 #ifndef CHROME_BROWSER_UI_VIEWS_MESSAGE_CENTER_WEB_NOTIFICATION_TRAY_H_
6 #define CHROME_BROWSER_UI_VIEWS_MESSAGE_CENTER_WEB_NOTIFICATION_TRAY_H_ 6 #define CHROME_BROWSER_UI_VIEWS_MESSAGE_CENTER_WEB_NOTIFICATION_TRAY_H_
7 7
8 #include "base/memory/weak_ptr.h" 8 #include "base/memory/weak_ptr.h"
9 #include "chrome/browser/status_icons/status_icon_observer.h" 9 #include "chrome/browser/status_icons/status_icon_observer.h"
10 #include "ui/base/models/simple_menu_model.h" 10 #include "ui/base/models/simple_menu_model.h"
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after
54 // These are forwarded to WebNotificationTray by 54 // These are forwarded to WebNotificationTray by
55 // NotificationBubbleWrapper classes since they don't have enough 55 // NotificationBubbleWrapper classes since they don't have enough
56 // context to provide the required data for TrayBubbleView::Delegate. 56 // context to provide the required data for TrayBubbleView::Delegate.
57 gfx::Rect GetMessageCenterAnchor(); 57 gfx::Rect GetMessageCenterAnchor();
58 gfx::Rect GetPopupAnchor(); 58 gfx::Rect GetPopupAnchor();
59 gfx::NativeView GetBubbleWindowContainer(); 59 gfx::NativeView GetBubbleWindowContainer();
60 views::TrayBubbleView::AnchorAlignment GetAnchorAlignment(); 60 views::TrayBubbleView::AnchorAlignment GetAnchorAlignment();
61 61
62 // StatusIconObserver implementation. 62 // StatusIconObserver implementation.
63 virtual void OnStatusIconClicked() OVERRIDE; 63 virtual void OnStatusIconClicked() OVERRIDE;
64 virtual void OnBalloonClicked() OVERRIDE;
64 65
65 // Changes the icon and hovertext based on number of unread notifications. 66 // Changes the icon and hovertext based on number of unread notifications.
66 void UpdateStatusIcon(); 67 void UpdateStatusIcon();
67 void HideBubbleWithView(const views::TrayBubbleView* bubble_view); 68 void HideBubbleWithView(const views::TrayBubbleView* bubble_view);
68 69
70 // This shows a platform-specific balloon informing the user of the existence
71 // of the message center in the status tray area.
72 void DisplayFirstRunBalloon();
73
69 private: 74 private:
70 FRIEND_TEST_ALL_PREFIXES(WebNotificationTrayTest, WebNotifications); 75 FRIEND_TEST_ALL_PREFIXES(WebNotificationTrayTest, WebNotifications);
71 FRIEND_TEST_ALL_PREFIXES(WebNotificationTrayTest, WebNotificationPopupBubble); 76 FRIEND_TEST_ALL_PREFIXES(WebNotificationTrayTest, WebNotificationPopupBubble);
72 FRIEND_TEST_ALL_PREFIXES(WebNotificationTrayTest, 77 FRIEND_TEST_ALL_PREFIXES(WebNotificationTrayTest,
73 ManyMessageCenterNotifications); 78 ManyMessageCenterNotifications);
74 FRIEND_TEST_ALL_PREFIXES(WebNotificationTrayTest, ManyPopupNotifications); 79 FRIEND_TEST_ALL_PREFIXES(WebNotificationTrayTest, ManyPopupNotifications);
75 80
76 StatusIcon* GetStatusIcon(); 81 StatusIcon* GetStatusIcon();
77 void DestroyStatusIcon(); 82 void DestroyStatusIcon();
78 void AddQuietModeMenu(StatusIcon* status_icon); 83 void AddQuietModeMenu(StatusIcon* status_icon);
79 message_center::MessageCenterBubble* GetMessageCenterBubbleForTest(); 84 message_center::MessageCenterBubble* GetMessageCenterBubbleForTest();
80 85
81 scoped_ptr<internal::NotificationBubbleWrapper> message_center_bubble_; 86 scoped_ptr<internal::NotificationBubbleWrapper> message_center_bubble_;
82 scoped_ptr<message_center::MessagePopupCollection> popup_collection_; 87 scoped_ptr<message_center::MessagePopupCollection> popup_collection_;
83 88
89 bool shown_status_balloon_;
84 StatusIcon* status_icon_; 90 StatusIcon* status_icon_;
85 bool message_center_visible_; 91 bool message_center_visible_;
86 scoped_ptr<MessageCenterTray> message_center_tray_; 92 scoped_ptr<MessageCenterTray> message_center_tray_;
87 gfx::Point mouse_click_point_; 93 gfx::Point mouse_click_point_;
88 94
89 bool should_update_tray_content_; 95 bool should_update_tray_content_;
90 96
91 DISALLOW_COPY_AND_ASSIGN(WebNotificationTray); 97 DISALLOW_COPY_AND_ASSIGN(WebNotificationTray);
92 }; 98 };
93 99
94 } // namespace message_center 100 } // namespace message_center
95 101
96 #endif // CHROME_BROWSER_UI_VIEWS_MESSAGE_CENTER_WEB_NOTIFICATION_TRAY_H_ 102 #endif // CHROME_BROWSER_UI_VIEWS_MESSAGE_CENTER_WEB_NOTIFICATION_TRAY_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698