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

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

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