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

Side by Side Diff: chrome/browser/ui/views/avatar_menu_bubble_view.h

Issue 7566050: Multi-Profiles: Change avatar menu to bubble view (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Address review comments Created 9 years, 4 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
OLDNEW
(Empty)
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
3 // found in the LICENSE file.
4
5 #ifndef CHROME_BROWSER_UI_VIEWS_AVATAR_MENU_BUBBLE_VIEW_H_
6 #define CHROME_BROWSER_UI_VIEWS_AVATAR_MENU_BUBBLE_VIEW_H_
7 #pragma once
8
9 #include <vector>
10
11 #include "chrome/browser/profiles/avatar_menu_model_observer.h"
12 #include "chrome/browser/ui/views/bubble/bubble.h"
13 #include "views/controls/button/image_button.h"
14
15 class AvatarMenuModel;
16 class Browser;
17 class EditUserButton;
18
19 // This bubble view is displayed when the user clicks on the avatar button.
20 // It displays a list of profiles and allows users to switch between profiles.
21 class AvatarMenuBubbleView : public views::View,
22 public BubbleDelegate,
23 public views::ButtonListener,
24 public AvatarMenuModelObserver {
25 public:
26 explicit AvatarMenuBubbleView(Browser* browser);
27 ~AvatarMenuBubbleView();
28
29 // views::View implementation.
30 virtual gfx::Size GetPreferredSize() OVERRIDE;
31 virtual void Layout() OVERRIDE;
32
33 // views::ButtonListener implementation.
34 virtual void ButtonPressed(views::Button* sender,
35 const views::Event& event) OVERRIDE;
36
37 // BubbleDelegate implementation.
38 virtual void BubbleClosing(Bubble* bubble, bool closed_by_escape) OVERRIDE;
39 virtual bool CloseOnEscape() OVERRIDE;
40 virtual bool FadeInOnShow() OVERRIDE;
41
42 // AvatarMenuModelObserver implementation.
43 virtual void OnAvatarMenuModelChanged() OVERRIDE;
44
45 private:
46 views::ImageButton* add_user_button_;
47 scoped_ptr<AvatarMenuModel> avatar_menu_model_;
48 Browser* browser_;
49 EditUserButton* edit_user_button_;
50 std::vector<views::ImageButton*> item_views_;
51
52 DISALLOW_COPY_AND_ASSIGN(AvatarMenuBubbleView);
53 };
54
55 #endif // CHROME_BROWSER_UI_VIEWS_AVATAR_MENU_BUBBLE_VIEW_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698