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 | 7 |
8 #include <vector> | 8 #include <vector> |
9 | 9 |
10 #include "base/basictypes.h" | 10 #include "base/basictypes.h" |
(...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
70 // AvatarMenuModelObserver implementation. | 70 // AvatarMenuModelObserver implementation. |
71 virtual void OnAvatarMenuModelChanged( | 71 virtual void OnAvatarMenuModelChanged( |
72 AvatarMenuModel* avatar_menu_model) OVERRIDE; | 72 AvatarMenuModel* avatar_menu_model) OVERRIDE; |
73 | 73 |
74 private: | 74 private: |
75 AvatarMenuBubbleView(views::View* anchor_view, | 75 AvatarMenuBubbleView(views::View* anchor_view, |
76 views::BubbleBorder::ArrowLocation arrow_location, | 76 views::BubbleBorder::ArrowLocation arrow_location, |
77 const gfx::Rect& anchor_rect, | 77 const gfx::Rect& anchor_rect, |
78 Browser* browser); | 78 Browser* browser); |
79 | 79 |
80 views::Link* add_profile_link_; | |
81 scoped_ptr<AvatarMenuModel> avatar_menu_model_; | 80 scoped_ptr<AvatarMenuModel> avatar_menu_model_; |
82 gfx::Rect anchor_rect_; | 81 gfx::Rect anchor_rect_; |
83 Browser* browser_; | 82 Browser* browser_; |
84 std::vector<views::CustomButton*> item_views_; | 83 std::vector<views::CustomButton*> item_views_; |
| 84 |
| 85 // These will be non-NULL iff |
| 86 // avatar_menu_model_->ShouldShowAddNewProfileLink() returns true. See |
| 87 // OnAvatarMenuModelChanged(). |
85 views::Separator* separator_; | 88 views::Separator* separator_; |
| 89 views::Link* add_profile_link_; |
86 | 90 |
87 static AvatarMenuBubbleView* avatar_bubble_; | 91 static AvatarMenuBubbleView* avatar_bubble_; |
88 | 92 |
89 DISALLOW_COPY_AND_ASSIGN(AvatarMenuBubbleView); | 93 DISALLOW_COPY_AND_ASSIGN(AvatarMenuBubbleView); |
90 }; | 94 }; |
91 | 95 |
92 #endif // CHROME_BROWSER_UI_VIEWS_AVATAR_MENU_BUBBLE_VIEW_H_ | 96 #endif // CHROME_BROWSER_UI_VIEWS_AVATAR_MENU_BUBBLE_VIEW_H_ |
OLD | NEW |