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

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

Issue 8500004: Rebase AvatarMenuBubbleView on the new views bubble. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Remove unused var and fix init order (nits). Created 9 years, 1 month 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
« no previous file with comments | « no previous file | chrome/browser/ui/views/avatar_menu_bubble_view.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/views/avatar_menu_bubble_view.h
diff --git a/chrome/browser/ui/views/avatar_menu_bubble_view.h b/chrome/browser/ui/views/avatar_menu_bubble_view.h
index c606a3a29922aad8648682d058aed5f804767366..894b1f3a15af6dc089a076d75d195ad098051efa 100644
--- a/chrome/browser/ui/views/avatar_menu_bubble_view.h
+++ b/chrome/browser/ui/views/avatar_menu_bubble_view.h
@@ -11,7 +11,7 @@
#include "base/basictypes.h"
#include "base/compiler_specific.h"
#include "chrome/browser/profiles/avatar_menu_model_observer.h"
-#include "chrome/browser/ui/views/bubble/bubble.h"
+#include "ui/views/bubble/bubble_delegate.h"
#include "views/controls/button/button.h"
#include "views/controls/link_listener.h"
@@ -26,13 +26,15 @@ class Separator;
// This bubble view is displayed when the user clicks on the avatar button.
// It displays a list of profiles and allows users to switch between profiles.
-class AvatarMenuBubbleView : public views::View,
+class AvatarMenuBubbleView : public views::BubbleDelegateView,
public views::ButtonListener,
public views::LinkListener,
- public BubbleDelegate,
public AvatarMenuModelObserver {
public:
- explicit AvatarMenuBubbleView(Browser* browser);
+ AvatarMenuBubbleView(views::View* anchor_view,
+ views::BubbleBorder::ArrowLocation arrow_location,
+ const gfx::Rect& anchor_rect,
+ Browser* browser);
virtual ~AvatarMenuBubbleView();
// views::View implementation.
@@ -48,10 +50,8 @@ class AvatarMenuBubbleView : public views::View,
virtual void LinkClicked(views::Link* source, int event_flags) OVERRIDE;
// BubbleDelegate implementation.
- virtual void BubbleShown() OVERRIDE;
- virtual void BubbleClosing(Bubble* bubble, bool closed_by_escape) OVERRIDE;
- virtual bool CloseOnEscape() OVERRIDE;
- virtual bool FadeInOnShow() OVERRIDE;
+ virtual gfx::Point GetAnchorPoint() OVERRIDE;
+ virtual void Init() OVERRIDE;
// AvatarMenuModelObserver implementation.
virtual void OnAvatarMenuModelChanged(
@@ -60,6 +60,7 @@ class AvatarMenuBubbleView : public views::View,
private:
views::Link* add_profile_link_;
scoped_ptr<AvatarMenuModel> avatar_menu_model_;
+ gfx::Rect anchor_rect_;
Browser* browser_;
std::vector<views::CustomButton*> item_views_;
views::Separator* separator_;
« no previous file with comments | « no previous file | chrome/browser/ui/views/avatar_menu_bubble_view.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698