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

Unified Diff: ash/system/web_notification/web_notification_bubble.h

Issue 11028134: Re-factor Ash Message Center code part 2/4 (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase Created 8 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
« no previous file with comments | « ash/system/web_notification/popup_bubble.cc ('k') | ash/system/web_notification/web_notification_bubble.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ash/system/web_notification/web_notification_bubble.h
diff --git a/ash/system/web_notification/web_notification_bubble.h b/ash/system/web_notification/web_notification_bubble.h
index e0c66c1dfea5c8fd1ce5d87be350a18d581231b5..d7061442f4b1f5a40abbcc55d556231b41b94678 100644
--- a/ash/system/web_notification/web_notification_bubble.h
+++ b/ash/system/web_notification/web_notification_bubble.h
@@ -6,21 +6,22 @@
#define ASH_SYSTEM_NOTIFICATION_WEB_NOTIFICATION_BUBBLE_H_
#include "ash/system/tray/tray_bubble_view.h"
-#include "ui/views/widget/widget_observer.h"
+#include "base/memory/scoped_ptr.h"
namespace ash {
class WebNotificationTray;
-using internal::TrayBubbleView;
+namespace internal {
+class TrayBubbleWrapper;
+}
namespace message_center {
class WebNotificationContentsView;
class WebNotificationView;
-class WebNotificationBubble : public TrayBubbleView::Host,
- public views::WidgetObserver {
+class WebNotificationBubble : public TrayBubbleView::Delegate {
public:
explicit WebNotificationBubble(WebNotificationTray* tray);
@@ -37,29 +38,23 @@ class WebNotificationBubble : public TrayBubbleView::Host,
bool IsVisible() const;
- views::Widget* bubble_widget() const { return bubble_widget_; }
TrayBubbleView* bubble_view() const { return bubble_view_; }
- // Overridden from TrayBubbleView::Host.
+ // Overridden from TrayBubbleView::Delegate.
virtual void BubbleViewDestroyed() OVERRIDE;
-
virtual void OnMouseEnteredView() OVERRIDE;
-
virtual void OnMouseExitedView() OVERRIDE;
-
- virtual void OnClickedOutsideView() OVERRIDE;
-
virtual string16 GetAccessibleName() OVERRIDE;
-
- // Overridden from views::WidgetObserver:
- virtual void OnWidgetClosing(views::Widget* widget) OVERRIDE;
+ virtual gfx::Rect GetAnchorRect(views::Widget* anchor_widget,
+ AnchorType anchor_type,
+ AnchorAlignment anchor_alignment) OVERRIDE;
protected:
TrayBubbleView::InitParams GetInitParams();
WebNotificationTray* tray_;
TrayBubbleView* bubble_view_;
- views::Widget* bubble_widget_;
+ scoped_ptr<internal::TrayBubbleWrapper> bubble_wrapper_;
base::WeakPtrFactory<WebNotificationBubble> weak_ptr_factory_;
DISALLOW_COPY_AND_ASSIGN(WebNotificationBubble);
« no previous file with comments | « ash/system/web_notification/popup_bubble.cc ('k') | ash/system/web_notification/web_notification_bubble.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698