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

Side by Side Diff: chrome/browser/cocoa/status_bubble_mac.mm

Issue 149474: Expand status bubble to accommodate long URLs.... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 10 years, 7 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « chrome/browser/cocoa/status_bubble_mac.h ('k') | chrome/browser/gtk/status_bubble_gtk.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 <limits> 7 #include <limits>
8 8
9 #include "app/text_elider.h" 9 #include "app/text_elider.h"
10 #include "base/compiler_specific.h" 10 #include "base/compiler_specific.h"
(...skipping 274 matching lines...) Expand 10 before | Expand all | Expand 10 after
285 } else { 285 } else {
286 [[window_ contentView] setCornerFlags:kRoundedTopRightCorner]; 286 [[window_ contentView] setCornerFlags:kRoundedTopRightCorner];
287 } 287 }
288 288
289 [window_ setFrame:window_frame display:YES]; 289 [window_ setFrame:window_frame display:YES];
290 } 290 }
291 291
292 void StatusBubbleMac::UpdateDownloadShelfVisibility(bool visible) { 292 void StatusBubbleMac::UpdateDownloadShelfVisibility(bool visible) {
293 } 293 }
294 294
295 void StatusBubbleMac::SetBubbleWidth(int width) {
296 NOTIMPLEMENTED();
297 }
298
295 void StatusBubbleMac::Create() { 299 void StatusBubbleMac::Create() {
296 if (window_) 300 if (window_)
297 return; 301 return;
298 302
299 // TODO(avi):fix this for RTL 303 // TODO(avi):fix this for RTL
300 NSRect window_rect = CalculateWindowFrame(); 304 NSRect window_rect = CalculateWindowFrame();
301 // initWithContentRect has origin in screen coords and size in scaled window 305 // initWithContentRect has origin in screen coords and size in scaled window
302 // coordinates. 306 // coordinates.
303 window_rect.size = 307 window_rect.size =
304 [[parent_ contentView] convertSize:window_rect.size fromView:nil]; 308 [[parent_ contentView] convertSize:window_rect.size fromView:nil];
(...skipping 256 matching lines...) Expand 10 before | Expand all | Expand 10 after
561 DCHECK(parent_); 565 DCHECK(parent_);
562 566
563 NSSize size = NSMakeSize(0, kWindowHeight); 567 NSSize size = NSMakeSize(0, kWindowHeight);
564 size = [[parent_ contentView] convertSize:size toView:nil]; 568 size = [[parent_ contentView] convertSize:size toView:nil];
565 569
566 NSRect rect = [parent_ frame]; 570 NSRect rect = [parent_ frame];
567 rect.size.height = size.height; 571 rect.size.height = size.height;
568 rect.size.width = static_cast<int>(kWindowWidthPercent * rect.size.width); 572 rect.size.width = static_cast<int>(kWindowWidthPercent * rect.size.width);
569 return rect; 573 return rect;
570 } 574 }
OLDNEW
« no previous file with comments | « chrome/browser/cocoa/status_bubble_mac.h ('k') | chrome/browser/gtk/status_bubble_gtk.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698