| OLD | NEW |
| 1 // Copyright 2017 The Chromium Authors. All rights reserved. | 1 // Copyright 2017 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_md.h" | 5 #include "ui/message_center/views/notification_view_md.h" |
| 6 | 6 |
| 7 #include <stddef.h> | 7 #include <stddef.h> |
| 8 | 8 |
| 9 #include "base/strings/string_util.h" | 9 #include "base/strings/string_util.h" |
| 10 #include "ui/base/cursor/cursor.h" | 10 #include "ui/base/cursor/cursor.h" |
| (...skipping 449 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 460 } | 460 } |
| 461 | 461 |
| 462 void NotificationViewMD::RequestFocusOnCloseButton() { | 462 void NotificationViewMD::RequestFocusOnCloseButton() { |
| 463 if (header_row_->IsCloseButtonEnabled()) | 463 if (header_row_->IsCloseButtonEnabled()) |
| 464 header_row_->close_button()->RequestFocus(); | 464 header_row_->close_button()->RequestFocus(); |
| 465 } | 465 } |
| 466 | 466 |
| 467 void NotificationViewMD::CreateOrUpdateContextTitleView( | 467 void NotificationViewMD::CreateOrUpdateContextTitleView( |
| 468 const Notification& notification) { | 468 const Notification& notification) { |
| 469 header_row_->SetAppName(notification.display_source()); | 469 header_row_->SetAppName(notification.display_source()); |
| 470 header_row_->SetTimestamp(notification.timestamp()); |
| 470 } | 471 } |
| 471 | 472 |
| 472 void NotificationViewMD::CreateOrUpdateTitleView( | 473 void NotificationViewMD::CreateOrUpdateTitleView( |
| 473 const Notification& notification) { | 474 const Notification& notification) { |
| 474 if (notification.type() == NOTIFICATION_TYPE_PROGRESS) { | 475 if (notification.type() == NOTIFICATION_TYPE_PROGRESS) { |
| 475 left_content_->RemoveChildView(title_view_); | 476 left_content_->RemoveChildView(title_view_); |
| 476 title_view_ = nullptr; | 477 title_view_ = nullptr; |
| 477 return; | 478 return; |
| 478 } | 479 } |
| 479 const gfx::FontList& font_list = views::Label().font_list().Derive( | 480 const gfx::FontList& font_list = views::Label().font_list().Derive( |
| (...skipping 287 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 767 header_row_->expand_button()->HasFocus()) || | 768 header_row_->expand_button()->HasFocus()) || |
| 768 (header_row_->IsCloseButtonEnabled() && | 769 (header_row_->IsCloseButtonEnabled() && |
| 769 header_row_->close_button()->HasFocus()) || | 770 header_row_->close_button()->HasFocus()) || |
| 770 (header_row_->IsSettingsButtonEnabled() && | 771 (header_row_->IsSettingsButtonEnabled() && |
| 771 header_row_->settings_button()->HasFocus()); | 772 header_row_->settings_button()->HasFocus()); |
| 772 | 773 |
| 773 header_row_->SetControlButtonsVisible(target_visibility); | 774 header_row_->SetControlButtonsVisible(target_visibility); |
| 774 } | 775 } |
| 775 | 776 |
| 776 } // namespace message_center | 777 } // namespace message_center |
| OLD | NEW |