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

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

Issue 8907001: Update avatar bubble if profile info changes (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: address review comments Created 9 years 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
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
(...skipping 23 matching lines...) Expand all
34 AvatarMenuBubbleView(views::View* anchor_view, 34 AvatarMenuBubbleView(views::View* anchor_view,
35 views::BubbleBorder::ArrowLocation arrow_location, 35 views::BubbleBorder::ArrowLocation arrow_location,
36 const gfx::Rect& anchor_rect, 36 const gfx::Rect& anchor_rect,
37 Browser* browser); 37 Browser* browser);
38 virtual ~AvatarMenuBubbleView(); 38 virtual ~AvatarMenuBubbleView();
39 39
40 // views::View implementation. 40 // views::View implementation.
41 virtual gfx::Size GetPreferredSize() OVERRIDE; 41 virtual gfx::Size GetPreferredSize() OVERRIDE;
42 virtual void Layout() OVERRIDE; 42 virtual void Layout() OVERRIDE;
43 virtual bool AcceleratorPressed(const ui::Accelerator& accelerator) OVERRIDE; 43 virtual bool AcceleratorPressed(const ui::Accelerator& accelerator) OVERRIDE;
44 virtual void ViewHierarchyChanged(bool is_add, View* parent, View* child)
45 OVERRIDE;
Peter Kasting 2011/12/13 02:25:11 Nit: The wrapping scheme we've been using for cons
44 46
45 // views::ButtonListener implementation. 47 // views::ButtonListener implementation.
46 virtual void ButtonPressed(views::Button* sender, 48 virtual void ButtonPressed(views::Button* sender,
47 const views::Event& event) OVERRIDE; 49 const views::Event& event) OVERRIDE;
48 50
49 // views::LinkListener implementation. 51 // views::LinkListener implementation.
50 virtual void LinkClicked(views::Link* source, int event_flags) OVERRIDE; 52 virtual void LinkClicked(views::Link* source, int event_flags) OVERRIDE;
51 53
52 // BubbleDelegate implementation. 54 // BubbleDelegate implementation.
53 virtual gfx::Rect GetAnchorRect() OVERRIDE; 55 virtual gfx::Rect GetAnchorRect() OVERRIDE;
54 virtual void Init() OVERRIDE; 56 virtual void Init() OVERRIDE;
55 57
56 // AvatarMenuModelObserver implementation. 58 // AvatarMenuModelObserver implementation.
57 virtual void OnAvatarMenuModelChanged( 59 virtual void OnAvatarMenuModelChanged(
58 AvatarMenuModel* avatar_menu_model) OVERRIDE; 60 AvatarMenuModel* avatar_menu_model) OVERRIDE;
59 61
60 private: 62 private:
61 views::Link* add_profile_link_; 63 views::Link* add_profile_link_;
62 scoped_ptr<AvatarMenuModel> avatar_menu_model_; 64 scoped_ptr<AvatarMenuModel> avatar_menu_model_;
63 gfx::Rect anchor_rect_; 65 gfx::Rect anchor_rect_;
64 Browser* browser_; 66 Browser* browser_;
65 std::vector<views::CustomButton*> item_views_; 67 std::vector<views::CustomButton*> item_views_;
66 views::Separator* separator_; 68 views::Separator* separator_;
67 69
68 DISALLOW_COPY_AND_ASSIGN(AvatarMenuBubbleView); 70 DISALLOW_COPY_AND_ASSIGN(AvatarMenuBubbleView);
69 }; 71 };
70 72
71 #endif // CHROME_BROWSER_UI_VIEWS_AVATAR_MENU_BUBBLE_VIEW_H_ 73 #endif // CHROME_BROWSER_UI_VIEWS_AVATAR_MENU_BUBBLE_VIEW_H_
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/ui/views/avatar_menu_bubble_view.cc » ('j') | chrome/browser/ui/views/avatar_menu_bubble_view.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698