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

Unified Diff: chrome/browser/ui/views/new_avatar_button.h

Issue 24647003: Redesign of the avatar menu button. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: better fix for app/popup browser crash Created 7 years, 2 months 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 side-by-side diff with in-line comments
Download patch
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..ad0d64a4f3196dd4400e39ef6f628ac52beed818
--- /dev/null
+++ b/chrome/browser/ui/views/new_avatar_button.h
@@ -0,0 +1,35 @@
+// 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 "ui/views/controls/button/menu_button.h"
+
+// Avatar button that displays the active profile's name in the caption area.
+class NewAvatarButton : public views::MenuButton {
+ public:
+ // Different button styles that can be applied.
+ enum AvatarButtonStyle {
+ THEMED_BUTTON, // Used in a themed browser window.
+ GLASS_BUTTON, // Used in a native aero window.
+ METRO_BUTTON // Used in a metro window.
+ };
+
+ NewAvatarButton(views::ButtonListener* listener,
+ const string16& profile_name,
+ AvatarButtonStyle button_style);
+ virtual ~NewAvatarButton();
+
+ // views::View:
+ virtual void OnPaint(gfx::Canvas* canvas) OVERRIDE;
+
+ private:
+ friend class NewAvatarMenuButtonTest;
+ FRIEND_TEST_ALL_PREFIXES(NewAvatarMenuButtonTest, SignOut);
+
+ DISALLOW_COPY_AND_ASSIGN(NewAvatarButton);
+};
+
+#endif // CHROME_BROWSER_UI_VIEWS_NEW_AVATAR_BUTTON_H_

Powered by Google App Engine
This is Rietveld 408576698