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

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

Issue 2972493002: Implement time stamp in new-style notification. (Closed)
Patch Set: Fix UI strings. Created 3 years, 5 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_header_view.cc ('k') | ui/strings/ui_strings.grd » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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
OLDNEW
« no previous file with comments | « ui/message_center/views/notification_header_view.cc ('k') | ui/strings/ui_strings.grd » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698