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

Side by Side Diff: ui/message_center/views/message_popup_collection.cc

Issue 264123002: Google Now Message Center Stats (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rename Created 6 years, 7 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
« no previous file with comments | « ui/message_center/views/message_center_view.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. 1 // Copyright (c) 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 #include "ui/message_center/views/message_popup_collection.h" 5 #include "ui/message_center/views/message_popup_collection.h"
6 6
7 #include <set> 7 #include <set>
8 8
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/i18n/rtl.h" 10 #include "base/i18n/rtl.h"
(...skipping 168 matching lines...) Expand 10 before | Expand all | Expand 10 after
179 if (top_down) 179 if (top_down)
180 base += view_height + kToastMarginY; 180 base += view_height + kToastMarginY;
181 else 181 else
182 base -= view_height + kToastMarginY; 182 base -= view_height + kToastMarginY;
183 183
184 if (views::ViewsDelegate::views_delegate) { 184 if (views::ViewsDelegate::views_delegate) {
185 views::ViewsDelegate::views_delegate->NotifyAccessibilityEvent( 185 views::ViewsDelegate::views_delegate->NotifyAccessibilityEvent(
186 toast, ui::AX_EVENT_ALERT); 186 toast, ui::AX_EVENT_ALERT);
187 } 187 }
188 188
189 message_center_->DisplayedNotification((*iter)->id()); 189 message_center_->DisplayedNotification(
190 (*iter)->id(), message_center::DISPLAY_SOURCE_POPUP);
190 } 191 }
191 } 192 }
192 193
193 void MessagePopupCollection::OnMouseEntered(ToastContentsView* toast_entered) { 194 void MessagePopupCollection::OnMouseEntered(ToastContentsView* toast_entered) {
194 // Sometimes we can get two MouseEntered/MouseExited in a row when animating 195 // Sometimes we can get two MouseEntered/MouseExited in a row when animating
195 // toasts. So we need to keep track of which one is the currently active one. 196 // toasts. So we need to keep track of which one is the currently active one.
196 latest_toast_entered_ = toast_entered; 197 latest_toast_entered_ = toast_entered;
197 198
198 message_center_->PausePopupTimers(); 199 message_center_->PausePopupTimers();
199 200
(...skipping 405 matching lines...) Expand 10 before | Expand all | Expand 10 after
605 views::Widget* widget = (*iter)->GetWidget(); 606 views::Widget* widget = (*iter)->GetWidget();
606 if (widget) 607 if (widget)
607 return widget->GetWindowBoundsInScreen(); 608 return widget->GetWindowBoundsInScreen();
608 break; 609 break;
609 } 610 }
610 } 611 }
611 return gfx::Rect(); 612 return gfx::Rect();
612 } 613 }
613 614
614 } // namespace message_center 615 } // namespace message_center
OLDNEW
« no previous file with comments | « ui/message_center/views/message_center_view.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698