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

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

Issue 1223153003: Move JoinString to the base namespace (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: windows Created 5 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/bounded_label.cc ('k') | ui/views/controls/table/table_view.cc » ('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 (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 "base/command_line.h" 7 #include "base/command_line.h"
8 #include "base/stl_util.h" 8 #include "base/stl_util.h"
9 #include "base/strings/string_util.h" 9 #include "base/strings/string_util.h"
10 #include "base/strings/utf_string_conversions.h" 10 #include "base/strings/utf_string_conversions.h"
(...skipping 316 matching lines...) Expand 10 before | Expand all | Expand 10 after
327 void NotificationView::SetAccessibleName(const Notification& notification) { 327 void NotificationView::SetAccessibleName(const Notification& notification) {
328 std::vector<base::string16> accessible_lines; 328 std::vector<base::string16> accessible_lines;
329 accessible_lines.push_back(notification.title()); 329 accessible_lines.push_back(notification.title());
330 accessible_lines.push_back(notification.message()); 330 accessible_lines.push_back(notification.message());
331 accessible_lines.push_back(notification.context_message()); 331 accessible_lines.push_back(notification.context_message());
332 std::vector<NotificationItem> items = notification.items(); 332 std::vector<NotificationItem> items = notification.items();
333 for (size_t i = 0; i < items.size() && i < kNotificationMaximumItems; ++i) { 333 for (size_t i = 0; i < items.size() && i < kNotificationMaximumItems; ++i) {
334 accessible_lines.push_back(items[i].title + base::ASCIIToUTF16(" ") + 334 accessible_lines.push_back(items[i].title + base::ASCIIToUTF16(" ") +
335 items[i].message); 335 items[i].message);
336 } 336 }
337 set_accessible_name(JoinString(accessible_lines, '\n')); 337 set_accessible_name(
338 base::JoinString(accessible_lines, base::ASCIIToUTF16("\n")));
338 } 339 }
339 340
340 NotificationView::NotificationView(MessageCenterController* controller, 341 NotificationView::NotificationView(MessageCenterController* controller,
341 const Notification& notification) 342 const Notification& notification)
342 : MessageView(this, 343 : MessageView(this,
343 notification.id(), 344 notification.id(),
344 notification.notifier_id(), 345 notification.notifier_id(),
345 notification.small_image().AsImageSkia(), 346 notification.small_image().AsImageSkia(),
346 notification.display_source()), 347 notification.display_source()),
347 controller_(controller), 348 controller_(controller),
(...skipping 437 matching lines...) Expand 10 before | Expand all | Expand 10 after
785 786
786 return message_line_limit; 787 return message_line_limit;
787 } 788 }
788 789
789 int NotificationView::GetMessageHeight(int width, int limit) const { 790 int NotificationView::GetMessageHeight(int width, int limit) const {
790 return message_view_ ? 791 return message_view_ ?
791 message_view_->GetSizeForWidthAndLines(width, limit).height() : 0; 792 message_view_->GetSizeForWidthAndLines(width, limit).height() : 0;
792 } 793 }
793 794
794 } // namespace message_center 795 } // namespace message_center
OLDNEW
« no previous file with comments | « ui/message_center/views/bounded_label.cc ('k') | ui/views/controls/table/table_view.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698