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_VIEWS_AVATAR_MENU_BUBBLE_VIEW_H_ | 5 #ifndef CHROME_BROWSER_UI_VIEWS_AVATAR_MENU_BUBBLE_VIEW_H_ |
6 #define CHROME_BROWSER_UI_VIEWS_AVATAR_MENU_BUBBLE_VIEW_H_ | 6 #define CHROME_BROWSER_UI_VIEWS_AVATAR_MENU_BUBBLE_VIEW_H_ |
7 #pragma once | 7 #pragma once |
8 | 8 |
9 #include <vector> | 9 #include <vector> |
10 | 10 |
11 #include "chrome/browser/profiles/avatar_menu_model_observer.h" | 11 #include "chrome/browser/profiles/avatar_menu_model_observer.h" |
12 #include "chrome/browser/ui/views/bubble/bubble.h" | 12 #include "chrome/browser/ui/views/bubble/bubble.h" |
13 #include "views/controls/button/custom_button.h" | 13 #include "views/controls/button/custom_button.h" |
14 #include "views/controls/link.h" | 14 #include "views/controls/link.h" |
15 #include "views/controls/link_listener.h" | 15 #include "views/controls/link_listener.h" |
| 16 #include "views/controls/separator.h" |
16 | 17 |
17 class AvatarMenuModel; | 18 class AvatarMenuModel; |
18 class Browser; | 19 class Browser; |
19 class EditProfileButton; | |
20 | 20 |
21 // This bubble view is displayed when the user clicks on the avatar button. | 21 // This bubble view is displayed when the user clicks on the avatar button. |
22 // It displays a list of profiles and allows users to switch between profiles. | 22 // It displays a list of profiles and allows users to switch between profiles. |
23 class AvatarMenuBubbleView : public views::View, | 23 class AvatarMenuBubbleView : public views::View, |
24 public views::ButtonListener, | 24 public views::ButtonListener, |
25 public views::LinkListener, | 25 public views::LinkListener, |
26 public BubbleDelegate, | 26 public BubbleDelegate, |
27 public AvatarMenuModelObserver { | 27 public AvatarMenuModelObserver { |
28 public: | 28 public: |
29 explicit AvatarMenuBubbleView(Browser* browser); | 29 explicit AvatarMenuBubbleView(Browser* browser); |
(...skipping 16 matching lines...) Expand all Loading... |
46 virtual bool FadeInOnShow() OVERRIDE; | 46 virtual bool FadeInOnShow() OVERRIDE; |
47 | 47 |
48 // AvatarMenuModelObserver implementation. | 48 // AvatarMenuModelObserver implementation. |
49 virtual void OnAvatarMenuModelChanged( | 49 virtual void OnAvatarMenuModelChanged( |
50 AvatarMenuModel* avatar_menu_model) OVERRIDE; | 50 AvatarMenuModel* avatar_menu_model) OVERRIDE; |
51 | 51 |
52 private: | 52 private: |
53 views::Link* add_profile_link_; | 53 views::Link* add_profile_link_; |
54 scoped_ptr<AvatarMenuModel> avatar_menu_model_; | 54 scoped_ptr<AvatarMenuModel> avatar_menu_model_; |
55 Browser* browser_; | 55 Browser* browser_; |
56 EditProfileButton* edit_profile_button_; | |
57 std::vector<views::CustomButton*> item_views_; | 56 std::vector<views::CustomButton*> item_views_; |
| 57 views::Separator* separator_; |
58 | 58 |
59 DISALLOW_COPY_AND_ASSIGN(AvatarMenuBubbleView); | 59 DISALLOW_COPY_AND_ASSIGN(AvatarMenuBubbleView); |
60 }; | 60 }; |
61 | 61 |
62 #endif // CHROME_BROWSER_UI_VIEWS_AVATAR_MENU_BUBBLE_VIEW_H_ | 62 #endif // CHROME_BROWSER_UI_VIEWS_AVATAR_MENU_BUBBLE_VIEW_H_ |
OLD | NEW |