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

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

Issue 11028134: Re-factor Ash Message Center code part 2/4 (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase Created 8 years, 2 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
« no previous file with comments | « ash/system/web_notification/web_notification_tray.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ash/system/web_notification/web_notification_tray.cc
diff --git a/ash/system/web_notification/web_notification_tray.cc b/ash/system/web_notification/web_notification_tray.cc
index 0ca6e3c1c613469d48fc5f0631398d360cbcf7a1..b904c337a31171fac91ccac84c185ace0e07975d 100644
--- a/ash/system/web_notification/web_notification_tray.cc
+++ b/ash/system/web_notification/web_notification_tray.cc
@@ -350,14 +350,24 @@ void WebNotificationTray::UpdateTrayAndBubble() {
UpdateTray();
}
-void WebNotificationTray::HideBubble(WebNotificationBubble* bubble) {
- if (bubble == message_center_bubble()) {
+void WebNotificationTray::HideBubbleWithView(
+ const TrayBubbleView* bubble_view) {
+ if (message_center_bubble() &&
+ bubble_view == message_center_bubble()->bubble_view()) {
HideMessageCenterBubble();
- } else if (bubble == popup_bubble()) {
+ } else if (popup_bubble() && bubble_view == popup_bubble()->bubble_view()) {
HidePopupBubble();
}
}
+bool WebNotificationTray::ClickedOutsideBubble() {
+ // Only hide the message center.
+ if (!message_center_bubble())
+ return false;
+ HideMessageCenterBubble();
+ return true;
+}
+
// Methods for testing
size_t WebNotificationTray::GetNotificationCountForTest() const {
« no previous file with comments | « ash/system/web_notification/web_notification_tray.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698