| Index: ui/message_center/views/notification_view.cc
|
| diff --git a/ui/message_center/views/notification_view.cc b/ui/message_center/views/notification_view.cc
|
| index f65b597fa179a0609ae16f47e6329e25f75ce73b..da0e9a2239a2fc600277c98ad93daa59ec8ea6ea 100644
|
| --- a/ui/message_center/views/notification_view.cc
|
| +++ b/ui/message_center/views/notification_view.cc
|
| @@ -708,10 +708,7 @@ void NotificationView::CreateOrUpdateCloseButtonView(
|
| }
|
|
|
| void NotificationView::UpdateControlButtonsVisibility() {
|
| - const bool target_visibility =
|
| - IsMouseHovered() || HasFocus() ||
|
| - (close_button_ && close_button_->HasFocus()) ||
|
| - (settings_button_view_ && settings_button_view_->HasFocus());
|
| + const bool target_visibility = IsMouseHovered() || HasFocusedView();
|
|
|
| if (close_button_) {
|
| if (target_visibility != close_button_->visible())
|
| @@ -765,4 +762,9 @@ int NotificationView::GetMessageHeight(int width, int limit) const {
|
| message_view_->GetSizeForWidthAndLines(width, limit).height() : 0;
|
| }
|
|
|
| +bool NotificationView::HasFocusedView() {
|
| + const views::FocusManager* focus_manager = GetFocusManager();
|
| + return focus_manager && Contains(focus_manager->GetFocusedView());
|
| +}
|
| +
|
| } // namespace message_center
|
|
|