| OLD | NEW |
| 1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "chrome/browser/cocoa/status_bubble_mac.h" | 5 #include "chrome/browser/cocoa/status_bubble_mac.h" |
| 6 | 6 |
| 7 #include "app/gfx/text_elider.h" | 7 #include "app/gfx/text_elider.h" |
| 8 #include "base/string_util.h" | 8 #include "base/string_util.h" |
| 9 #include "base/sys_string_conversions.h" | 9 #include "base/sys_string_conversions.h" |
| 10 #include "googleurl/src/gurl.h" | 10 #include "googleurl/src/gurl.h" |
| (...skipping 170 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 181 offset_ = offset; | 181 offset_ = offset; |
| 182 window_frame.origin.y -= offset; | 182 window_frame.origin.y -= offset; |
| 183 [window_ setFrame:window_frame display:YES]; | 183 [window_ setFrame:window_frame display:YES]; |
| 184 } else { | 184 } else { |
| 185 offset_ = 0; | 185 offset_ = 0; |
| 186 [[window_ contentView] setStyle:STYLE_STANDARD]; | 186 [[window_ contentView] setStyle:STYLE_STANDARD]; |
| 187 [window_ setFrame:window_frame display:YES]; | 187 [window_ setFrame:window_frame display:YES]; |
| 188 } | 188 } |
| 189 } | 189 } |
| 190 | 190 |
| 191 void StatusBubbleMac::UpdateDownloadShelfVisibility(bool visible) { |
| 192 NOTIMPLEMENTED(); |
| 193 } |
| 194 |
| 191 void StatusBubbleMac::Create() { | 195 void StatusBubbleMac::Create() { |
| 192 if (window_) | 196 if (window_) |
| 193 return; | 197 return; |
| 194 | 198 |
| 195 NSRect rect = [parent_ frame]; | 199 NSRect rect = [parent_ frame]; |
| 196 rect.size.height = kWindowHeight; | 200 rect.size.height = kWindowHeight; |
| 197 rect.size.width = static_cast<int>(kWindowWidthPercent * rect.size.width); | 201 rect.size.width = static_cast<int>(kWindowWidthPercent * rect.size.width); |
| 198 // TODO(avi):fix this for RTL | 202 // TODO(avi):fix this for RTL |
| 199 window_ = [[NSWindow alloc] initWithContentRect:rect | 203 window_ = [[NSWindow alloc] initWithContentRect:rect |
| 200 styleMask:NSBorderlessWindowMask | 204 styleMask:NSBorderlessWindowMask |
| (...skipping 115 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 316 | 320 |
| 317 NSDictionary* textDict = [NSDictionary dictionaryWithObjectsAndKeys: | 321 NSDictionary* textDict = [NSDictionary dictionaryWithObjectsAndKeys: |
| 318 textFont, NSFontAttributeName, | 322 textFont, NSFontAttributeName, |
| 319 textShadow, NSShadowAttributeName, | 323 textShadow, NSShadowAttributeName, |
| 320 nil]; | 324 nil]; |
| 321 [content_ drawAtPoint:NSMakePoint(kTextPositionX, kTextPositionY) | 325 [content_ drawAtPoint:NSMakePoint(kTextPositionX, kTextPositionY) |
| 322 withAttributes:textDict]; | 326 withAttributes:textDict]; |
| 323 } | 327 } |
| 324 | 328 |
| 325 @end | 329 @end |
| OLD | NEW |