OLD | NEW |
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 499 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
510 views::BubbleBorder::Arrow arrow, | 510 views::BubbleBorder::Arrow arrow, |
511 const gfx::Rect& anchor_rect, | 511 const gfx::Rect& anchor_rect, |
512 Browser* browser) | 512 Browser* browser) |
513 : BubbleDelegateView(anchor_view, arrow), | 513 : BubbleDelegateView(anchor_view, arrow), |
514 anchor_rect_(anchor_rect), | 514 anchor_rect_(anchor_rect), |
515 browser_(browser), | 515 browser_(browser), |
516 separator_(NULL), | 516 separator_(NULL), |
517 buttons_view_(NULL), | 517 buttons_view_(NULL), |
518 supervised_user_info_(NULL), | 518 supervised_user_info_(NULL), |
519 separator_switch_users_(NULL), | 519 separator_switch_users_(NULL), |
| 520 switch_profile_link_(nullptr), |
520 expanded_(false) { | 521 expanded_(false) { |
521 avatar_menu_.reset(new AvatarMenu( | 522 avatar_menu_.reset(new AvatarMenu( |
522 &g_browser_process->profile_manager()->GetProfileInfoCache(), | 523 &g_browser_process->profile_manager()->GetProfileInfoCache(), |
523 this, | 524 this, |
524 browser_)); | 525 browser_)); |
525 avatar_menu_->RebuildMenu(); | 526 avatar_menu_->RebuildMenu(); |
526 } | 527 } |
527 | 528 |
528 AvatarMenuBubbleView::~AvatarMenuBubbleView() { | 529 AvatarMenuBubbleView::~AvatarMenuBubbleView() { |
529 } | 530 } |
(...skipping 265 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
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 } |
OLD | NEW |