diff options
author | paul@chromium.org <paul@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-09-15 19:25:19 +0000 |
---|---|---|
committer | paul@chromium.org <paul@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-09-15 19:25:19 +0000 |
commit | d225f59c134c0be88c03f208c6cfaaa1ad4fc0b7 (patch) | |
tree | 5206a4c125dd933d163f9bbd248e0cfe7af87b89 /chrome/browser/cocoa/status_bubble_mac.mm | |
parent | 57f7edd5e79bba97565a75c5a33c2b1216961220 (diff) | |
download | chromium_src-d225f59c134c0be88c03f208c6cfaaa1ad4fc0b7.zip chromium_src-d225f59c134c0be88c03f208c6cfaaa1ad4fc0b7.tar.gz chromium_src-d225f59c134c0be88c03f208c6cfaaa1ad4fc0b7.tar.bz2 |
Committing original patch http://codereview.chromium.org/178036
by Vassili Bykov.
BUG=19983
TEST=Follow the steps in the bug to test the bubble's
move-out-of-the-way behavior with dowload shelf
both visible and hidden.
Review URL: http://codereview.chromium.org/200135
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@26250 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/cocoa/status_bubble_mac.mm')
-rw-r--r-- | chrome/browser/cocoa/status_bubble_mac.mm | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/chrome/browser/cocoa/status_bubble_mac.mm b/chrome/browser/cocoa/status_bubble_mac.mm index 529ea81..1f2ecfa 100644 --- a/chrome/browser/cocoa/status_bubble_mac.mm +++ b/chrome/browser/cocoa/status_bubble_mac.mm @@ -127,6 +127,13 @@ void StatusBubbleMac::MouseMoved() { NSRect window_frame = [window_ frame]; window_frame.origin = [parent_ frame].origin; + // Adjust the position to sit on top of download shelf. + // |delegate_| can be nil during unit tests. + if (is_download_shelf_visible_) { + if ([delegate_ respondsToSelector:@selector(verticalOffsetForStatusBubble)]) + window_frame.origin.y += [delegate_ verticalOffsetForStatusBubble]; + } + // Get the cursor position relative to the popup. cursor_location.x -= NSMaxX(window_frame); cursor_location.y -= NSMaxY(window_frame); @@ -168,12 +175,6 @@ void StatusBubbleMac::MouseMoved() { [[window_ contentView] setCornerFlags:kRoundedTopRightCorner]; } - // |delegate_| can be nil during unit tests. - if (is_download_shelf_visible_) { - if ([delegate_ respondsToSelector:@selector(verticalOffsetForStatusBubble)]) - window_frame.origin.y += [delegate_ verticalOffsetForStatusBubble]; - } - [window_ setFrame:window_frame display:YES]; } |