| OLD | NEW |
| 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 Loading... |
| 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 400 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 759 | 764 |
| 760 return message_line_limit; | 765 return message_line_limit; |
| 761 } | 766 } |
| 762 | 767 |
| 763 int NotificationView::GetMessageHeight(int width, int limit) const { | 768 int NotificationView::GetMessageHeight(int width, int limit) const { |
| 764 return message_view_ ? | 769 return message_view_ ? |
| 765 message_view_->GetSizeForWidthAndLines(width, limit).height() : 0; | 770 message_view_->GetSizeForWidthAndLines(width, limit).height() : 0; |
| 766 } | 771 } |
| 767 | 772 |
| 768 } // namespace message_center | 773 } // namespace message_center |
| OLD | NEW |