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

Side by Side Diff: chrome/browser/ui/views/profiles/avatar_menu_bubble_view.cc

Issue 494383003: Supervised users: Properly display long custodian emails in the disclaimer. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 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 | Annotate | Revision Log
« no previous file with comments | « no previous file | chrome/browser/ui/views/profiles/profile_chooser_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 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 "chrome/browser/ui/views/profiles/avatar_menu_bubble_view.h" 5 #include "chrome/browser/ui/views/profiles/avatar_menu_bubble_view.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 8
9 #include "base/strings/string16.h" 9 #include "base/strings/string16.h"
10 #include "base/strings/utf_string_conversions.h" 10 #include "base/strings/utf_string_conversions.h"
(...skipping 739 matching lines...) Expand 10 before | Expand all | Expand 10 after
750 AddChildView(item_view); 750 AddChildView(item_view);
751 separator_ = new views::Separator(views::Separator::HORIZONTAL); 751 separator_ = new views::Separator(views::Separator::HORIZONTAL);
752 AddChildView(separator_); 752 AddChildView(separator_);
753 753
754 // Add information about supervised users. 754 // Add information about supervised users.
755 supervised_user_info_ = 755 supervised_user_info_ =
756 new views::Label(avatar_menu_->GetSupervisedUserInformation(), 756 new views::Label(avatar_menu_->GetSupervisedUserInformation(),
757 ui::ResourceBundle::GetSharedInstance().GetFontList( 757 ui::ResourceBundle::GetSharedInstance().GetFontList(
758 ui::ResourceBundle::SmallFont)); 758 ui::ResourceBundle::SmallFont));
759 supervised_user_info_->SetMultiLine(true); 759 supervised_user_info_->SetMultiLine(true);
760 supervised_user_info_->SetAllowCharacterBreak(true);
760 supervised_user_info_->SetHorizontalAlignment(gfx::ALIGN_LEFT); 761 supervised_user_info_->SetHorizontalAlignment(gfx::ALIGN_LEFT);
761 supervised_user_info_->SetBackgroundColor(color()); 762 supervised_user_info_->SetBackgroundColor(color());
762 AddChildView(supervised_user_info_); 763 AddChildView(supervised_user_info_);
763 764
764 // Add the supervised user icon. 765 // Add the supervised user icon.
765 icon_view_ = new views::ImageView(); 766 icon_view_ = new views::ImageView();
766 icon_view_->SetImage(avatar_menu_->GetSupervisedUserIcon().ToImageSkia()); 767 icon_view_->SetImage(avatar_menu_->GetSupervisedUserIcon().ToImageSkia());
767 AddChildView(icon_view_); 768 AddChildView(icon_view_);
768 769
769 // Add a link for switching profiles. 770 // Add a link for switching profiles.
(...skipping 25 matching lines...) Expand all
795 Layout(); 796 Layout();
796 if (GetBubbleFrameView()) 797 if (GetBubbleFrameView())
797 SizeToContents(); 798 SizeToContents();
798 } 799 }
799 800
800 void AvatarMenuBubbleView::SetBackgroundColors() { 801 void AvatarMenuBubbleView::SetBackgroundColors() {
801 for (size_t i = 0; i < item_views_.size(); ++i) { 802 for (size_t i = 0; i < item_views_.size(); ++i) {
802 item_views_[i]->OnHighlightStateChanged(); 803 item_views_[i]->OnHighlightStateChanged();
803 } 804 }
804 } 805 }
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/ui/views/profiles/profile_chooser_view.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698