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

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

Issue 12897004: Remove BubbleDelegateView::Show(); call GetWidget()->Show() instead; etc. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fixup more BubbleDelegateView::Show() calls. Created 7 years, 9 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
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 "chrome/browser/ui/views/avatar_menu_bubble_view.h" 5 #include "chrome/browser/ui/views/avatar_menu_bubble_view.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 8
9 #include "base/utf_string_conversions.h" 9 #include "base/utf_string_conversions.h"
10 #include "chrome/app/chrome_command_ids.h" 10 #include "chrome/app/chrome_command_ids.h"
(...skipping 389 matching lines...) Expand 10 before | Expand all | Expand 10 after
400 Browser* browser) { 400 Browser* browser) {
401 if (IsShowing()) 401 if (IsShowing())
402 return; 402 return;
403 403
404 DCHECK(chrome::IsCommandEnabled(browser, IDC_SHOW_AVATAR_MENU)); 404 DCHECK(chrome::IsCommandEnabled(browser, IDC_SHOW_AVATAR_MENU));
405 avatar_bubble_ = new AvatarMenuBubbleView( 405 avatar_bubble_ = new AvatarMenuBubbleView(
406 anchor_view, arrow_location, anchor_rect, browser); 406 anchor_view, arrow_location, anchor_rect, browser);
407 views::BubbleDelegateView::CreateBubble(avatar_bubble_); 407 views::BubbleDelegateView::CreateBubble(avatar_bubble_);
408 avatar_bubble_->SetBackgroundColors(); 408 avatar_bubble_->SetBackgroundColors();
409 avatar_bubble_->SetAlignment(border_alignment); 409 avatar_bubble_->SetAlignment(border_alignment);
410 avatar_bubble_->Show(); 410 avatar_bubble_->GetWidget()->Show();
411 } 411 }
412 412
413 // static 413 // static
414 bool AvatarMenuBubbleView::IsShowing() { 414 bool AvatarMenuBubbleView::IsShowing() {
415 return avatar_bubble_ != NULL; 415 return avatar_bubble_ != NULL;
416 } 416 }
417 417
418 // static 418 // static
419 void AvatarMenuBubbleView::Hide() { 419 void AvatarMenuBubbleView::Hide() {
420 if (IsShowing()) 420 if (IsShowing())
(...skipping 174 matching lines...) Expand 10 before | Expand all | Expand 10 after
595 Layout(); 595 Layout();
596 if (GetBubbleFrameView()) 596 if (GetBubbleFrameView())
597 SizeToContents(); 597 SizeToContents();
598 } 598 }
599 599
600 void AvatarMenuBubbleView::SetBackgroundColors() { 600 void AvatarMenuBubbleView::SetBackgroundColors() {
601 for (size_t i = 0; i < item_views_.size(); ++i) { 601 for (size_t i = 0; i < item_views_.size(); ++i) {
602 item_views_[i]->OnHighlightStateChanged(); 602 item_views_[i]->OnHighlightStateChanged();
603 } 603 }
604 } 604 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/views/app_list/app_list_controller_win.cc ('k') | chrome/browser/ui/views/bookmarks/bookmark_bubble_view.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698