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

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: 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/tray/system_tray_bubble.cc ('k') | ash/system/tray/tray_background_view.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 9b4b3db6ec97046983a9f1660fa1a93d6d4890ca..2d496a55b6e6b45ea817795e4d7d766d8b556ef2 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;
+ // Hides the bubble associated with |bubble_view|. Called when the widget
+ // is closed.
+ 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);
+ // Initializes animations for the bubble.
+ 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_;
}
« no previous file with comments | « ash/system/tray/system_tray_bubble.cc ('k') | ash/system/tray/tray_background_view.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698