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

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

Issue 8909013: Patch AvatarMenuBubbleView crash; only SizeToContents if GetBubbleFrameView. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Run OnAvatarMenuModelChanged on Init, not ctor. 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;
46 44
47 // views::ButtonListener implementation. 45 // views::ButtonListener implementation.
48 virtual void ButtonPressed(views::Button* sender, 46 virtual void ButtonPressed(views::Button* sender,
49 const views::Event& event) OVERRIDE; 47 const views::Event& event) OVERRIDE;
50 48
51 // views::LinkListener implementation. 49 // views::LinkListener implementation.
52 virtual void LinkClicked(views::Link* source, int event_flags) OVERRIDE; 50 virtual void LinkClicked(views::Link* source, int event_flags) OVERRIDE;
53 51
54 // BubbleDelegate implementation. 52 // BubbleDelegate implementation.
55 virtual gfx::Rect GetAnchorRect() OVERRIDE; 53 virtual gfx::Rect GetAnchorRect() OVERRIDE;
56 virtual void Init() OVERRIDE; 54 virtual void Init() OVERRIDE;
57 55
58 // AvatarMenuModelObserver implementation. 56 // AvatarMenuModelObserver implementation.
59 virtual void OnAvatarMenuModelChanged( 57 virtual void OnAvatarMenuModelChanged(
60 AvatarMenuModel* avatar_menu_model) OVERRIDE; 58 AvatarMenuModel* avatar_menu_model) OVERRIDE;
61 59
62 private: 60 private:
63 views::Link* add_profile_link_; 61 views::Link* add_profile_link_;
64 scoped_ptr<AvatarMenuModel> avatar_menu_model_; 62 scoped_ptr<AvatarMenuModel> avatar_menu_model_;
65 gfx::Rect anchor_rect_; 63 gfx::Rect anchor_rect_;
66 Browser* browser_; 64 Browser* browser_;
67 std::vector<views::CustomButton*> item_views_; 65 std::vector<views::CustomButton*> item_views_;
68 views::Separator* separator_; 66 views::Separator* separator_;
69 67
70 DISALLOW_COPY_AND_ASSIGN(AvatarMenuBubbleView); 68 DISALLOW_COPY_AND_ASSIGN(AvatarMenuBubbleView);
71 }; 69 };
72 70
73 #endif // CHROME_BROWSER_UI_VIEWS_AVATAR_MENU_BUBBLE_VIEW_H_ 71 #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