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

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

Issue 667413002: Merge 299672 "Initialize |switch_profile_link_| in the constructor." (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@2171
Patch Set: Created 6 years, 1 month 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 | « no previous file | no next file » | 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 499 matching lines...) Expand 10 before | Expand all | Expand 10 after
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 266 matching lines...) Expand 10 before | Expand all | Expand 10 after
796 Layout(); 797 Layout();
797 if (GetBubbleFrameView()) 798 if (GetBubbleFrameView())
798 SizeToContents(); 799 SizeToContents();
799 } 800 }
800 801
801 void AvatarMenuBubbleView::SetBackgroundColors() { 802 void AvatarMenuBubbleView::SetBackgroundColors() {
802 for (size_t i = 0; i < item_views_.size(); ++i) { 803 for (size_t i = 0; i < item_views_.size(); ++i) {
803 item_views_[i]->OnHighlightStateChanged(); 804 item_views_[i]->OnHighlightStateChanged();
804 } 805 }
805 } 806 }
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698