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

Unified Diff: chrome/browser/cocoa/status_bubble_mac.mm

Issue 155706: Fix the URL status bubble overlapping the Mac download shelf (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 11 years, 5 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 | « chrome/browser/cocoa/status_bubble_mac.h ('k') | chrome/browser/cocoa/status_bubble_mac_unittest.mm » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/cocoa/status_bubble_mac.mm
===================================================================
--- chrome/browser/cocoa/status_bubble_mac.mm (revision 21184)
+++ chrome/browser/cocoa/status_bubble_mac.mm (working copy)
@@ -56,11 +56,13 @@
- (NSFont*)font;
@end
-StatusBubbleMac::StatusBubbleMac(NSWindow* parent)
+StatusBubbleMac::StatusBubbleMac(NSWindow* parent, id delegate)
: parent_(parent),
+ delegate_(delegate),
window_(nil),
status_text_(nil),
- url_text_(nil) {
+ url_text_(nil),
+ is_download_shelf_visible_(false) {
}
StatusBubbleMac::~StatusBubbleMac() {
@@ -180,16 +182,22 @@
offset_ = offset;
window_frame.origin.y -= offset;
- [window_ setFrame:window_frame display:YES];
} else {
offset_ = 0;
[[window_ contentView] setStyle:STYLE_STANDARD];
- [window_ setFrame:window_frame display:YES];
}
+
+ // |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];
}
void StatusBubbleMac::UpdateDownloadShelfVisibility(bool visible) {
- NOTIMPLEMENTED();
+ is_download_shelf_visible_ = visible;
}
void StatusBubbleMac::Create() {
« no previous file with comments | « chrome/browser/cocoa/status_bubble_mac.h ('k') | chrome/browser/cocoa/status_bubble_mac_unittest.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698