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

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

Issue 2230183002: ui: Use stl utilities from the base namespace (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebased Created 4 years, 4 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
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 614 matching lines...) Expand 10 before | Expand all | Expand 10 after
625 : NULL); 625 : NULL);
626 } 626 }
627 627
628 void NotificationView::CreateOrUpdateActionButtonViews( 628 void NotificationView::CreateOrUpdateActionButtonViews(
629 const Notification& notification) { 629 const Notification& notification) {
630 std::vector<ButtonInfo> buttons = notification.buttons(); 630 std::vector<ButtonInfo> buttons = notification.buttons();
631 bool new_buttons = action_buttons_.size() != buttons.size(); 631 bool new_buttons = action_buttons_.size() != buttons.size();
632 632
633 if (new_buttons || buttons.size() == 0) { 633 if (new_buttons || buttons.size() == 0) {
634 // STLDeleteElements also clears the container. 634 // STLDeleteElements also clears the container.
635 STLDeleteElements(&separators_); 635 base::STLDeleteElements(&separators_);
636 STLDeleteElements(&action_buttons_); 636 base::STLDeleteElements(&action_buttons_);
637 } 637 }
638 638
639 DCHECK(bottom_view_); 639 DCHECK(bottom_view_);
640 DCHECK_EQ(this, bottom_view_->parent()); 640 DCHECK_EQ(this, bottom_view_->parent());
641 641
642 for (size_t i = 0; i < buttons.size(); ++i) { 642 for (size_t i = 0; i < buttons.size(); ++i) {
643 ButtonInfo button_info = buttons[i]; 643 ButtonInfo button_info = buttons[i];
644 if (new_buttons) { 644 if (new_buttons) {
645 views::View* separator = new views::ImageView(); 645 views::View* separator = new views::ImageView();
646 separator->SetBorder(MakeSeparatorBorder(1, 0, kButtonSeparatorColor)); 646 separator->SetBorder(MakeSeparatorBorder(1, 0, kButtonSeparatorColor));
(...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after
704 704
705 return message_line_limit; 705 return message_line_limit;
706 } 706 }
707 707
708 int NotificationView::GetMessageHeight(int width, int limit) const { 708 int NotificationView::GetMessageHeight(int width, int limit) const {
709 return message_view_ ? 709 return message_view_ ?
710 message_view_->GetSizeForWidthAndLines(width, limit).height() : 0; 710 message_view_->GetSizeForWidthAndLines(width, limit).height() : 0;
711 } 711 }
712 712
713 } // namespace message_center 713 } // namespace message_center
OLDNEW
« no previous file with comments | « ui/message_center/views/message_list_view.cc ('k') | ui/views/accessibility/ax_aura_obj_cache.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698