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

Unified Diff: ash/system/tray/tray_background_view.h

Issue 11028134: Re-factor Ash Message Center code part 2/4 (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: HideBubble -> HideBubbleWithView 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
Index: ash/system/tray/tray_background_view.h
diff --git a/ash/system/tray/tray_background_view.h b/ash/system/tray/tray_background_view.h
index 9f33db7d212937925d25c101cdfed7e984ffc5d7..00e63b825db7d92f01b476872346a8eb82df59a3 100644
--- a/ash/system/tray/tray_background_view.h
+++ b/ash/system/tray/tray_background_view.h
@@ -7,6 +7,7 @@
#include "ash/ash_export.h"
#include "ash/launcher/background_animator.h"
+#include "ash/system/tray/tray_bubble_view.h"
#include "ash/system/tray/tray_views.h"
#include "ash/wm/shelf_types.h"
@@ -82,8 +83,17 @@ class ASH_EXPORT TrayBackgroundView : public internal::ActionableView,
// Called when the anchor (tray or bubble) may have moved or changed.
virtual void AnchorUpdated() {}
+ // Called from GetAccessibleState, must return a valid accessible name.
virtual string16 GetAccessibleName() = 0;
+ // Hide the bubble associated with |bubble_view|. Called when the widget
+ // is closed.
jennyz 2012/10/12 23:05:34 Hide -> Hides
stevenjb 2012/10/12 23:41:50 Done.
+ virtual void HideBubbleWithView(const TrayBubbleView* bubble_view) = 0;
+
+ // Called by the bubble wrapper when a click event occurs outside the bubble.
+ // May close the bubble. Returns true if the event is handled.
+ virtual bool ClickedOutsideBubble() = 0;
+
// Sets |contents| as a child.
void SetContents(views::View* contents);
@@ -96,6 +106,21 @@ class ASH_EXPORT TrayBackgroundView : public internal::ActionableView,
bool value,
internal::BackgroundAnimator::ChangeType change_type);
+ // Initialize animations for the bubble.
jennyz 2012/10/12 23:05:34 Initialize->Initializes
stevenjb 2012/10/12 23:41:50 Done.
+ void InitializeBubbleAnimations(views::Widget* bubble_widget);
+
+ // Returns the window hosting the bubble.
+ aura::Window* GetBubbleWindowContainer() const;
+
+ // Returns the anchor rect for the bubble.
+ gfx::Rect GetAnchorRect(
+ views::Widget* anchor_widget,
+ TrayBubbleView::AnchorType anchor_type,
+ TrayBubbleView::AnchorAlignment anchor_alignment) const;
+
+ // Returns the bubble anchor alignment based on |shelf_alignment_|.
+ TrayBubbleView::AnchorAlignment GetAnchorAlignment() const;
+
StatusAreaWidget* status_area_widget() {
return status_area_widget_;
}

Powered by Google App Engine
This is Rietveld 408576698