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_BUTTON_H_ | 5 #ifndef CHROME_BROWSER_UI_VIEWS_AVATAR_MENU_BUTTON_H_ |
6 #define CHROME_BROWSER_UI_VIEWS_AVATAR_MENU_BUTTON_H_ | 6 #define CHROME_BROWSER_UI_VIEWS_AVATAR_MENU_BUTTON_H_ |
7 #pragma once | 7 #pragma once |
8 | 8 |
9 #include <string> | 9 #include <string> |
10 | 10 |
(...skipping 23 matching lines...) Expand all Loading... |
34 | 34 |
35 virtual ~AvatarMenuButton(); | 35 virtual ~AvatarMenuButton(); |
36 | 36 |
37 // views::MenuButton | 37 // views::MenuButton |
38 virtual void OnPaint(gfx::Canvas* canvas) OVERRIDE; | 38 virtual void OnPaint(gfx::Canvas* canvas) OVERRIDE; |
39 virtual bool HitTest(const gfx::Point& point) const OVERRIDE; | 39 virtual bool HitTest(const gfx::Point& point) const OVERRIDE; |
40 | 40 |
41 // views::TextButton | 41 // views::TextButton |
42 virtual void SetIcon(const SkBitmap& icon) OVERRIDE; | 42 virtual void SetIcon(const SkBitmap& icon) OVERRIDE; |
43 | 43 |
| 44 void ShowAvatarBubble(); |
| 45 |
44 private: | 46 private: |
45 // views::ViewMenuDelegate | 47 // views::ViewMenuDelegate |
46 virtual void RunMenu(views::View* source, const gfx::Point& pt) OVERRIDE; | 48 virtual void RunMenu(views::View* source, const gfx::Point& pt) OVERRIDE; |
47 | 49 |
48 // Bubble::Observer implementation. | 50 // Bubble::Observer implementation. |
49 virtual void OnBubbleClosing(); | 51 virtual void OnBubbleClosing(); |
50 | 52 |
51 Browser* browser_; | 53 Browser* browser_; |
52 Bubble* bubble_; | 54 Bubble* bubble_; |
53 bool has_menu_; | 55 bool has_menu_; |
54 bool set_taskbar_decoration_; | 56 bool set_taskbar_decoration_; |
55 scoped_ptr<ui::MenuModel> menu_model_; | 57 scoped_ptr<ui::MenuModel> menu_model_; |
56 | 58 |
57 DISALLOW_COPY_AND_ASSIGN(AvatarMenuButton); | 59 DISALLOW_COPY_AND_ASSIGN(AvatarMenuButton); |
58 }; | 60 }; |
59 | 61 |
60 #endif // CHROME_BROWSER_UI_VIEWS_AVATAR_MENU_BUTTON_H_ | 62 #endif // CHROME_BROWSER_UI_VIEWS_AVATAR_MENU_BUTTON_H_ |
OLD | NEW |