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

Side by Side Diff: chrome/browser/ui/gtk/avatar_menu_button_gtk.cc

Issue 8664028: Profiles: Fixed crash when avatar bubble is launched using ctrl+shift+m with only default profile (Closed) Base URL: http://git.chromium.org/git/chromium.git@trunk
Patch Set: Fixed review comments Created 9 years 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 | 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 (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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/gtk/avatar_menu_button_gtk.h" 5 #include "chrome/browser/ui/gtk/avatar_menu_button_gtk.h"
6 6
7 #include "base/i18n/rtl.h" 7 #include "base/i18n/rtl.h"
8 #include "chrome/browser/profiles/profile_metrics.h" 8 #include "chrome/browser/profiles/profile_metrics.h"
9 #include "chrome/browser/ui/gtk/avatar_menu_bubble_gtk.h" 9 #include "chrome/browser/ui/gtk/avatar_menu_bubble_gtk.h"
10 #include "chrome/browser/ui/gtk/bubble/bubble_gtk.h" 10 #include "chrome/browser/ui/gtk/bubble/bubble_gtk.h"
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
42 GdkEventButton* event) { 42 GdkEventButton* event) {
43 if (event->button != 1) 43 if (event->button != 1)
44 return FALSE; 44 return FALSE;
45 45
46 ShowAvatarBubble(); 46 ShowAvatarBubble();
47 ProfileMetrics::LogProfileOpenMethod(ProfileMetrics::ICON_AVATAR_BUBBLE); 47 ProfileMetrics::LogProfileOpenMethod(ProfileMetrics::ICON_AVATAR_BUBBLE);
48 return TRUE; 48 return TRUE;
49 } 49 }
50 50
51 void AvatarMenuButtonGtk::ShowAvatarBubble() { 51 void AvatarMenuButtonGtk::ShowAvatarBubble() {
52 new AvatarMenuBubbleGtk(browser_, widget_.get(), arrow_location_, NULL); 52 // Only show the avatar bubble if the avatar button is in the title bar.
53 if (gtk_widget_get_parent_window(widget_.get()))
54 new AvatarMenuBubbleGtk(browser_, widget_.get(), arrow_location_, NULL);
53 } 55 }
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