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

Side by Side Diff: chrome/browser/ui/gtk/avatar_menu_bubble_gtk.h

Issue 8370021: Make avatar menu bubble as singleton and destroy all the menu items and menu model when bubble cl... (Closed) Base URL: http://src.chromium.org/svn/trunk/src/
Patch Set: '' Created 9 years, 2 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/gtk/avatar_menu_bubble_gtk.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 (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 #ifndef CHROME_BROWSER_UI_GTK_AVATAR_MENU_BUBBLE_GTK_H_ 5 #ifndef CHROME_BROWSER_UI_GTK_AVATAR_MENU_BUBBLE_GTK_H_
6 #define CHROME_BROWSER_UI_GTK_AVATAR_MENU_BUBBLE_GTK_H_ 6 #define CHROME_BROWSER_UI_GTK_AVATAR_MENU_BUBBLE_GTK_H_
7 #pragma once 7 #pragma once
8 8
9 #include <vector> 9 #include <vector>
10 10
(...skipping 30 matching lines...) Expand all
41 // AvatarMenuModelObserver implementation. 41 // AvatarMenuModelObserver implementation.
42 virtual void OnAvatarMenuModelChanged( 42 virtual void OnAvatarMenuModelChanged(
43 AvatarMenuModel* avatar_menu_model) OVERRIDE; 43 AvatarMenuModel* avatar_menu_model) OVERRIDE;
44 44
45 // AvatarMenuItemGtk::Delegate implementation. 45 // AvatarMenuItemGtk::Delegate implementation.
46 virtual void OpenProfile(size_t profile_index); 46 virtual void OpenProfile(size_t profile_index);
47 47
48 virtual void EditProfile(size_t profile_index); 48 virtual void EditProfile(size_t profile_index);
49 49
50 private: 50 private:
51 // Notified when |contents_| is destroyed so we can delete our instance.
52 CHROMEGTK_CALLBACK_0(AvatarMenuBubbleGtk, void, OnDestroy);
51 CHROMEGTK_CALLBACK_1(AvatarMenuBubbleGtk, void, OnSizeRequest, 53 CHROMEGTK_CALLBACK_1(AvatarMenuBubbleGtk, void, OnSizeRequest,
52 GtkRequisition*); 54 GtkRequisition*);
53 CHROMEGTK_CALLBACK_0(AvatarMenuBubbleGtk, void, OnNewProfileLinkClicked); 55 CHROMEGTK_CALLBACK_0(AvatarMenuBubbleGtk, void, OnNewProfileLinkClicked);
54 56
55 // Create all widgets in this bubble. 57 // Create all widgets in this bubble.
56 void InitContents(); 58 void InitContents();
57 59
58 // A model of all the profile information to be displayed in the menu. 60 // A model of all the profile information to be displayed in the menu.
59 scoped_ptr<AvatarMenuModel> avatar_menu_model_; 61 scoped_ptr<AvatarMenuModel> avatar_menu_model_;
60 62
(...skipping 10 matching lines...) Expand all
71 std::vector<AvatarMenuItemGtk*> items_; 73 std::vector<AvatarMenuItemGtk*> items_;
72 74
73 // The minimum width to display the bubble. This is used to prevent the bubble 75 // The minimum width to display the bubble. This is used to prevent the bubble
74 // from automatically reducing its size when hovering over a profile item. 76 // from automatically reducing its size when hovering over a profile item.
75 int minimum_width_; 77 int minimum_width_;
76 78
77 DISALLOW_COPY_AND_ASSIGN(AvatarMenuBubbleGtk); 79 DISALLOW_COPY_AND_ASSIGN(AvatarMenuBubbleGtk);
78 }; 80 };
79 81
80 #endif // CHROME_BROWSER_UI_GTK_AVATAR_MENU_BUBBLE_GTK_H_ 82 #endif // CHROME_BROWSER_UI_GTK_AVATAR_MENU_BUBBLE_GTK_H_
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/ui/gtk/avatar_menu_bubble_gtk.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698