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 174 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
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) { | 191 void StatusBubbleMac::UpdateDownloadShelfVisibility(bool visible) { |
192 NOTIMPLEMENTED(); | 192 NOTIMPLEMENTED(); |
193 } | 193 } |
194 | 194 |
| 195 void StatusBubbleMac::SetBubbleWidth(int width) { |
| 196 NOTIMPLEMENTED(); |
| 197 } |
| 198 |
195 void StatusBubbleMac::Create() { | 199 void StatusBubbleMac::Create() { |
196 if (window_) | 200 if (window_) |
197 return; | 201 return; |
198 | 202 |
199 NSRect rect = [parent_ frame]; | 203 NSRect rect = [parent_ frame]; |
200 rect.size.height = kWindowHeight; | 204 rect.size.height = kWindowHeight; |
201 rect.size.width = static_cast<int>(kWindowWidthPercent * rect.size.width); | 205 rect.size.width = static_cast<int>(kWindowWidthPercent * rect.size.width); |
202 // TODO(avi):fix this for RTL | 206 // TODO(avi):fix this for RTL |
203 window_ = [[NSWindow alloc] initWithContentRect:rect | 207 window_ = [[NSWindow alloc] initWithContentRect:rect |
204 styleMask:NSBorderlessWindowMask | 208 styleMask:NSBorderlessWindowMask |
(...skipping 115 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
320 | 324 |
321 NSDictionary* textDict = [NSDictionary dictionaryWithObjectsAndKeys: | 325 NSDictionary* textDict = [NSDictionary dictionaryWithObjectsAndKeys: |
322 textFont, NSFontAttributeName, | 326 textFont, NSFontAttributeName, |
323 textShadow, NSShadowAttributeName, | 327 textShadow, NSShadowAttributeName, |
324 nil]; | 328 nil]; |
325 [content_ drawAtPoint:NSMakePoint(kTextPositionX, kTextPositionY) | 329 [content_ drawAtPoint:NSMakePoint(kTextPositionX, kTextPositionY) |
326 withAttributes:textDict]; | 330 withAttributes:textDict]; |
327 } | 331 } |
328 | 332 |
329 @end | 333 @end |
OLD | NEW |