OLD | NEW |
(Empty) | |
| 1 // Copyright 2013 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_NEW_AVATAR_BUTTON_H_ |
| 6 #define CHROME_BROWSER_UI_VIEWS_NEW_AVATAR_BUTTON_H_ |
| 7 |
| 8 #include "base/compiler_specific.h" |
| 9 #include "ui/views/controls/button/menu_button.h" |
| 10 #include "ui/views/controls/button/text_button.h" |
| 11 |
| 12 class BrowserView; |
| 13 |
| 14 namespace ui { |
| 15 class MouseEvent; |
| 16 class ThemeProvider; |
| 17 } |
| 18 |
| 19 // Avatar button that displays the active profile's name in the caption area. |
| 20 class NewAvatarButton : public views::MenuButton { |
| 21 public: |
| 22 NewAvatarButton(BrowserView* browser_view, const string16& profile_name); |
| 23 virtual ~NewAvatarButton(); |
| 24 |
| 25 // views::TextButton: |
| 26 virtual bool OnMousePressed(const ui::MouseEvent& event) OVERRIDE; |
| 27 |
| 28 // views::View: |
| 29 virtual void OnPaint(gfx::Canvas* canvas) OVERRIDE; |
| 30 |
| 31 private: |
| 32 // Shows the ProfileChooserView bubble. |
| 33 void ShowAvatarBubble(); |
| 34 |
| 35 BrowserView* browser_view_; |
| 36 |
| 37 DISALLOW_COPY_AND_ASSIGN(NewAvatarButton); |
| 38 }; |
| 39 |
| 40 #endif // CHROME_BROWSER_UI_VIEWS_NEW_AVATAR_BUTTON_H_ |
OLD | NEW |