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

Unified Diff: chrome/browser/notifications/balloon_collection_mac.mm

Issue 8503037: Fix the problem that notifications and panels overlap. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix per feedback 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
Index: chrome/browser/notifications/balloon_collection_mac.mm
diff --git a/chrome/browser/notifications/balloon_collection_mac.mm b/chrome/browser/notifications/balloon_collection_mac.mm
index d31bc399ddb5a1c6138e930cfccdbdd87805098a..8ff3c8fa1abbe2b559cda1603bbaa6ef3e1acabe 100644
--- a/chrome/browser/notifications/balloon_collection_mac.mm
+++ b/chrome/browser/notifications/balloon_collection_mac.mm
@@ -35,6 +35,14 @@ int BalloonCollectionImpl::Layout::VerticalEdgeMargin() const {
return 0;
}
+bool BalloonCollectionImpl::Layout::NeedToMoveAboveLeftSidePanels() const {
+ return placement_ == VERTICALLY_FROM_TOP_LEFT;
+}
+
+bool BalloonCollectionImpl::Layout::NeedToMoveAboveRightSidePanels() const {
+ return placement_ == VERTICALLY_FROM_TOP_RIGHT;
+}
+
void BalloonCollectionImpl::PositionBalloons(bool reposition) {
// Use an animation context so that all the balloons animate together.
[NSAnimationContext beginGrouping];
@@ -61,6 +69,7 @@ void BalloonCollectionImpl::SetPositionPreference(
else
NOTREACHED();
+ layout_.ComputeOffsetToMoveAbovePanels(gfx::Rect());
PositionBalloons(true);
}

Powered by Google App Engine
This is Rietveld 408576698