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

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

Issue 2910003003: Call UpdateControlButtonsVisibility() in OnMouseMoved(). (Closed)
Patch Set: Created 3 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
« no previous file with comments | « ui/message_center/views/notification_view.h ('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) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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/notification_view.h" 5 #include "ui/message_center/views/notification_view.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 8
9 #include "base/command_line.h" 9 #include "base/command_line.h"
10 #include "base/macros.h" 10 #include "base/macros.h"
(...skipping 328 matching lines...) Expand 10 before | Expand all | Expand 10 after
339 views::View::ScrollRectToVisible(GetLocalBounds()); 339 views::View::ScrollRectToVisible(GetLocalBounds());
340 } 340 }
341 341
342 gfx::NativeCursor NotificationView::GetCursor(const ui::MouseEvent& event) { 342 gfx::NativeCursor NotificationView::GetCursor(const ui::MouseEvent& event) {
343 if (!clickable_ || !controller()->HasClickedListener(notification_id())) 343 if (!clickable_ || !controller()->HasClickedListener(notification_id()))
344 return views::View::GetCursor(event); 344 return views::View::GetCursor(event);
345 345
346 return views::GetNativeHandCursor(); 346 return views::GetNativeHandCursor();
347 } 347 }
348 348
349 void NotificationView::OnMouseMoved(const ui::MouseEvent& event) {
350 MessageView::OnMouseMoved(event);
351 UpdateControlButtonsVisibility();
352 }
353
349 void NotificationView::OnMouseEntered(const ui::MouseEvent& event) { 354 void NotificationView::OnMouseEntered(const ui::MouseEvent& event) {
350 MessageView::OnMouseEntered(event); 355 MessageView::OnMouseEntered(event);
351 UpdateControlButtonsVisibility(); 356 UpdateControlButtonsVisibility();
352 } 357 }
353 358
354 void NotificationView::OnMouseExited(const ui::MouseEvent& event) { 359 void NotificationView::OnMouseExited(const ui::MouseEvent& event) {
355 MessageView::OnMouseExited(event); 360 MessageView::OnMouseExited(event);
356 UpdateControlButtonsVisibility(); 361 UpdateControlButtonsVisibility();
357 } 362 }
358 363
(...skipping 396 matching lines...) Expand 10 before | Expand all | Expand 10 after
755 760
756 return message_line_limit; 761 return message_line_limit;
757 } 762 }
758 763
759 int NotificationView::GetMessageHeight(int width, int limit) const { 764 int NotificationView::GetMessageHeight(int width, int limit) const {
760 return message_view_ ? 765 return message_view_ ?
761 message_view_->GetSizeForWidthAndLines(width, limit).height() : 0; 766 message_view_->GetSizeForWidthAndLines(width, limit).height() : 0;
762 } 767 }
763 768
764 } // namespace message_center 769 } // namespace message_center
OLDNEW
« no previous file with comments | « ui/message_center/views/notification_view.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698