| OLD | NEW |
| 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 12 matching lines...) Expand all Loading... |
| 23 class GtkThemeService; | 23 class GtkThemeService; |
| 24 | 24 |
| 25 // This bubble is displayed when the user clicks on the avatar button. | 25 // This bubble is displayed when the user clicks on the avatar button. |
| 26 // It displays a list of profiles and allows users to switch between profiles. | 26 // It displays a list of profiles and allows users to switch between profiles. |
| 27 class AvatarMenuBubbleGtk : public BubbleDelegateGtk, | 27 class AvatarMenuBubbleGtk : public BubbleDelegateGtk, |
| 28 public AvatarMenuModelObserver, | 28 public AvatarMenuModelObserver, |
| 29 public AvatarMenuItemGtk::Delegate { | 29 public AvatarMenuItemGtk::Delegate { |
| 30 public: | 30 public: |
| 31 AvatarMenuBubbleGtk(Browser* browser, | 31 AvatarMenuBubbleGtk(Browser* browser, |
| 32 GtkWidget* anchor, | 32 GtkWidget* anchor, |
| 33 BubbleGtk::ArrowLocationGtk arrow); | 33 BubbleGtk::ArrowLocationGtk arrow, |
| 34 const gfx::Rect* rect); |
| 34 virtual ~AvatarMenuBubbleGtk(); | 35 virtual ~AvatarMenuBubbleGtk(); |
| 35 | 36 |
| 36 // BubbleDelegateGtk implementation. | 37 // BubbleDelegateGtk implementation. |
| 37 virtual void BubbleClosing(BubbleGtk* bubble, | 38 virtual void BubbleClosing(BubbleGtk* bubble, |
| 38 bool closed_by_escape) OVERRIDE; | 39 bool closed_by_escape) OVERRIDE; |
| 39 | 40 |
| 40 // AvatarMenuModelObserver implementation. | 41 // AvatarMenuModelObserver implementation. |
| 41 virtual void OnAvatarMenuModelChanged( | 42 virtual void OnAvatarMenuModelChanged( |
| 42 AvatarMenuModel* avatar_menu_model) OVERRIDE; | 43 AvatarMenuModel* avatar_menu_model) OVERRIDE; |
| 43 | 44 |
| (...skipping 26 matching lines...) Expand all Loading... |
| 70 std::vector<AvatarMenuItemGtk*> items_; | 71 std::vector<AvatarMenuItemGtk*> items_; |
| 71 | 72 |
| 72 // The minimum width to display the bubble. This is used to prevent the bubble | 73 // The minimum width to display the bubble. This is used to prevent the bubble |
| 73 // from automatically reducing its size when hovering over a profile item. | 74 // from automatically reducing its size when hovering over a profile item. |
| 74 int minimum_width_; | 75 int minimum_width_; |
| 75 | 76 |
| 76 DISALLOW_COPY_AND_ASSIGN(AvatarMenuBubbleGtk); | 77 DISALLOW_COPY_AND_ASSIGN(AvatarMenuBubbleGtk); |
| 77 }; | 78 }; |
| 78 | 79 |
| 79 #endif // CHROME_BROWSER_UI_GTK_AVATAR_MENU_BUBBLE_GTK_H_ | 80 #endif // CHROME_BROWSER_UI_GTK_AVATAR_MENU_BUBBLE_GTK_H_ |
| OLD | NEW |