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

Side by Side Diff: ash/system/user/user_card_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 | « ash/system/user/button_from_view.cc ('k') | base/debug/crash_logging.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 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 "ash/system/user/user_card_view.h" 5 #include "ash/system/user/user_card_view.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <vector> 8 #include <vector>
9 9
10 #include "ash/session/session_state_delegate.h" 10 #include "ash/session/session_state_delegate.h"
(...skipping 337 matching lines...) Expand 10 before | Expand all | Expand 10 after
348 } 348 }
349 } 349 }
350 350
351 UserCardView::~UserCardView() {} 351 UserCardView::~UserCardView() {}
352 352
353 void UserCardView::GetAccessibleState(ui::AXViewState* state) { 353 void UserCardView::GetAccessibleState(ui::AXViewState* state) {
354 state->role = ui::AX_ROLE_STATIC_TEXT; 354 state->role = ui::AX_ROLE_STATIC_TEXT;
355 std::vector<base::string16> labels; 355 std::vector<base::string16> labels;
356 for (int i = 0; i < child_count(); ++i) 356 for (int i = 0; i < child_count(); ++i)
357 GetAccessibleLabelFromDescendantViews(child_at(i), labels); 357 GetAccessibleLabelFromDescendantViews(child_at(i), labels);
358 state->name = JoinString(labels, base::ASCIIToUTF16(" ")); 358 state->name = base::JoinString(labels, base::ASCIIToUTF16(" "));
359 } 359 }
360 360
361 void UserCardView::AddPublicModeUserContent(int max_width) { 361 void UserCardView::AddPublicModeUserContent(int max_width) {
362 views::View* icon = CreateIcon(user::LOGGED_IN_PUBLIC, 0); 362 views::View* icon = CreateIcon(user::LOGGED_IN_PUBLIC, 0);
363 AddChildView(icon); 363 AddChildView(icon);
364 int details_max_width = max_width - icon->GetPreferredSize().width() - 364 int details_max_width = max_width - icon->GetPreferredSize().width() -
365 kTrayPopupPaddingBetweenItems; 365 kTrayPopupPaddingBetweenItems;
366 AddChildView(new PublicAccountUserDetails(details_max_width)); 366 AddChildView(new PublicAccountUserDetails(details_max_width));
367 } 367 }
368 368
(...skipping 96 matching lines...) Expand 10 before | Expand all | Expand 10 after
465 content::BrowserContext* context = 465 content::BrowserContext* context =
466 delegate->GetBrowserContextByIndex(multiprofile_index); 466 delegate->GetBrowserContextByIndex(multiprofile_index);
467 icon->SetImage(delegate->GetUserInfo(context)->GetImage(), 467 icon->SetImage(delegate->GetUserInfo(context)->GetImage(),
468 gfx::Size(kTrayAvatarSize, kTrayAvatarSize)); 468 gfx::Size(kTrayAvatarSize, kTrayAvatarSize));
469 } 469 }
470 return icon; 470 return icon;
471 } 471 }
472 472
473 } // namespace tray 473 } // namespace tray
474 } // namespace ash 474 } // namespace ash
OLDNEW
« no previous file with comments | « ash/system/user/button_from_view.cc ('k') | base/debug/crash_logging.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698