summaryrefslogtreecommitdiffstats
path: root/chrome/browser/ui/gtk/avatar_menu_item_gtk.h
diff options
context:
space:
mode:
authorbinji@chromium.org <binji@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-10-12 18:21:00 +0000
committerbinji@chromium.org <binji@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-10-12 18:21:00 +0000
commit8f1a315f514dba8a57f83979cf232e4ee045a12b (patch)
tree3af304b5058f545bfd053dcaa82ce41ee192c44a /chrome/browser/ui/gtk/avatar_menu_item_gtk.h
parent7b5008d1f13b30311d73884aaf4f0a15ac97db8b (diff)
downloadchromium_src-8f1a315f514dba8a57f83979cf232e4ee045a12b.zip
chromium_src-8f1a315f514dba8a57f83979cf232e4ee045a12b.tar.gz
chromium_src-8f1a315f514dba8a57f83979cf232e4ee045a12b.tar.bz2
Revert 105122 - [Multi Profile] Linux implementation of the avatar button and avatar bubble menu.
BUG=83169 TEST=Run chrome with the multi-profile flag. Create at least two users (on chrome://settings/personal). A profile button should be available in the upper left or right. Review URL: http://codereview.chromium.org/8226014 TBR=binji@chromium.org Review URL: http://codereview.chromium.org/8242016 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@105123 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/ui/gtk/avatar_menu_item_gtk.h')
-rw-r--r--chrome/browser/ui/gtk/avatar_menu_item_gtk.h77
1 files changed, 0 insertions, 77 deletions
diff --git a/chrome/browser/ui/gtk/avatar_menu_item_gtk.h b/chrome/browser/ui/gtk/avatar_menu_item_gtk.h
deleted file mode 100644
index fefde5b..0000000
--- a/chrome/browser/ui/gtk/avatar_menu_item_gtk.h
+++ /dev/null
@@ -1,77 +0,0 @@
-// Copyright (c) 2011 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_GTK_AVATAR_MENU_ITEM_GTK_H_
-#define CHROME_BROWSER_UI_GTK_AVATAR_MENU_ITEM_GTK_H_
-#pragma once
-
-#include <gtk/gtk.h>
-
-#include "chrome/browser/profiles/avatar_menu_model.h"
-#include "ui/base/gtk/gtk_signal.h"
-#include "ui/base/gtk/owned_widget_gtk.h"
-
-class GtkThemeService;
-
-// This widget contains the profile icon, user name, and synchronization status
-// to be displayed in the AvatarMenuBubble. Clicking the profile will open a new
-// browser window, and when the user hovers over an active profile item, a link
-// is displayed that will allow editing the profile.
-class AvatarMenuItemGtk {
- public:
- // Delegates opening or editing a profile.
- class Delegate {
- public:
- // Open a new browser window using the profile at |profile_index|.
- virtual void OpenProfile(size_t profile_index) = 0;
-
- // Edit the profile given by |profile_index|.
- virtual void EditProfile(size_t profile_index) = 0;
- };
-
- AvatarMenuItemGtk(Delegate* delegate,
- const AvatarMenuModel::Item& item,
- size_t item_index,
- GtkThemeService* theme_service);
- ~AvatarMenuItemGtk();
-
- // Returns the root widget for this menu item.
- GtkWidget* widget() { return widget_.get(); }
-
- private:
- CHROMEGTK_CALLBACK_1(AvatarMenuItemGtk, gboolean, OnProfileClick,
- GdkEventButton*);
- CHROMEGTK_CALLBACK_1(AvatarMenuItemGtk, gboolean, OnProfileEnter,
- GdkEventCrossing*);
- CHROMEGTK_CALLBACK_1(AvatarMenuItemGtk, gboolean, OnProfileLeave,
- GdkEventCrossing*);
- CHROMEGTK_CALLBACK_0(AvatarMenuItemGtk, void, OnEditProfileLinkClicked);
-
- // Create all widgets in this menu item, using |theme_service|.
- void Init(GtkThemeService* theme_service);
-
- // A weak pointer to the item's delegate.
- Delegate* delegate_;
-
- // Profile information to display for this item, e.g. user name, sync status.
- AvatarMenuModel::Item item_;
-
- // The index of this profile. The delegate uses this value to distinguish
- // which profile should be switched to.
- size_t item_index_;
-
- // The root widget for this menu item.
- ui::OwnedWidgetGtk widget_;
-
- // A weak pointer to a label that displays the sync status. It is not shown
- // when the user is hovering over the item if the profile is the active
- // profile.
- GtkWidget* status_label_;
-
- // A weak pointer to a link button to edit the given profile. It is shown only
- // when the user is hovering over the active profile.
- GtkWidget* link_alignment_;
-};
-
-#endif // CHROME_BROWSER_UI_GTK_AVATAR_MENU_ITEM_GTK_H_