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

Unified Diff: chrome/browser/ui/views/avatar_menu_button.cc

Issue 11646008: Close avatar bubble when avatar button is clicked a second time (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix build Created 7 years, 12 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/avatar_menu_button.cc
diff --git a/chrome/browser/ui/views/avatar_menu_button.cc b/chrome/browser/ui/views/avatar_menu_button.cc
index f1385b046762477962113c6c39e8739f4382c76f..bd3cb1c71a83c26f6f72cbb1301f4dd70e7bab67 100644
--- a/chrome/browser/ui/views/avatar_menu_button.cc
+++ b/chrome/browser/ui/views/avatar_menu_button.cc
@@ -4,7 +4,6 @@
#include "chrome/browser/ui/views/avatar_menu_button.h"
-#include "chrome/app/chrome_command_ids.h"
#include "chrome/browser/browser_process.h"
#include "chrome/browser/command_updater.h"
#include "chrome/browser/managed_mode/managed_mode.h"
@@ -13,7 +12,6 @@
#include "chrome/browser/profiles/profile_info_util.h"
#include "chrome/browser/profiles/profile_metrics.h"
#include "chrome/browser/ui/browser.h"
-#include "chrome/browser/ui/browser_commands.h"
#include "chrome/browser/ui/views/avatar_menu_bubble_view.h"
#include "chrome/browser/ui/views/frame/browser_view.h"
#include "chrome/common/chrome_notification_types.h"
@@ -160,16 +158,11 @@ void AvatarMenuButton::OnMenuButtonClicked(views::View* source,
}
void AvatarMenuButton::ShowAvatarBubble() {
- DCHECK(chrome::IsCommandEnabled(browser_, IDC_SHOW_AVATAR_MENU));
-
gfx::Point origin;
views::View::ConvertPointToScreen(this, &origin);
gfx::Rect bounds(origin, size());
-
- AvatarMenuBubbleView* bubble = new AvatarMenuBubbleView(this,
- views::BubbleBorder::TOP_LEFT, bounds, browser_);
- views::BubbleDelegateView::CreateBubble(bubble);
- bubble->Show();
+ AvatarMenuBubbleView::ShowBubble(this, views::BubbleBorder::TOP_LEFT,
+ views::BubbleBorder::ALIGN_ARROW_TO_MID_ANCHOR, bounds, browser_);
ProfileMetrics::LogProfileOpenMethod(ProfileMetrics::ICON_AVATAR_BUBBLE);
}
« no previous file with comments | « chrome/browser/ui/views/avatar_menu_button.h ('k') | chrome/browser/ui/views/avatar_menu_button_browsertest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698