Index: chrome/browser/ui/views/new_avatar_button.h |
diff --git a/chrome/browser/ui/views/new_avatar_button.h b/chrome/browser/ui/views/new_avatar_button.h |
new file mode 100644 |
index 0000000000000000000000000000000000000000..378d36b1db732b135bd96109d392de67176cf136 |
--- /dev/null |
+++ b/chrome/browser/ui/views/new_avatar_button.h |
@@ -0,0 +1,40 @@ |
+// Copyright 2013 The Chromium Authors. All rights reserved. |
+// Use of this source code is governed by a BSD-style license that can be |
+// found in the LICENSE file. |
+ |
+#ifndef CHROME_BROWSER_UI_VIEWS_NEW_AVATAR_BUTTON_H_ |
+#define CHROME_BROWSER_UI_VIEWS_NEW_AVATAR_BUTTON_H_ |
+ |
+#include "base/compiler_specific.h" |
+#include "ui/views/controls/button/menu_button.h" |
+#include "ui/views/controls/button/text_button.h" |
+ |
+class BrowserView; |
+ |
+namespace ui { |
+class MouseEvent; |
+class ThemeProvider; |
+} |
+ |
+// Avatar button that displays the active profile's name in the caption area. |
+class NewAvatarButton : public views::MenuButton { |
+ public: |
+ NewAvatarButton(BrowserView* browser_view, const string16& profile_name); |
+ virtual ~NewAvatarButton(); |
+ |
+ // views::TextButton: |
+ virtual bool OnMousePressed(const ui::MouseEvent& event) OVERRIDE; |
+ |
+ // views::View: |
+ virtual void OnPaint(gfx::Canvas* canvas) OVERRIDE; |
+ |
+ private: |
+ // Shows the ProfileChooserView bubble. |
+ void ShowAvatarBubble(); |
+ |
+ BrowserView* browser_view_; |
+ |
+ DISALLOW_COPY_AND_ASSIGN(NewAvatarButton); |
+}; |
+ |
+#endif // CHROME_BROWSER_UI_VIEWS_NEW_AVATAR_BUTTON_H_ |