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

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

Issue 2822026: Mac: First run bubble. (Closed)
Patch Set: '' Created 10 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
OLDNEW
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 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 #import "extension_installed_bubble_controller.h" 5 #import "extension_installed_bubble_controller.h"
6 6
7 #include "app/l10n_util.h" 7 #include "app/l10n_util.h"
8 #include "base/mac_util.h" 8 #include "base/mac_util.h"
9 #include "base/sys_string_conversions.h" 9 #include "base/sys_string_conversions.h"
10 #include "chrome/browser/browser.h" 10 #include "chrome/browser/browser.h"
(...skipping 207 matching lines...) Expand 10 before | Expand all | Expand 10 after
218 newFrame.size.height += windowDelta.height; 218 newFrame.size.height += windowDelta.height;
219 [window setFrame:newFrame display:NO]; 219 [window setFrame:newFrame display:NO];
220 220
221 // Now that we have resized the window, adjust y pos of the messages. 221 // Now that we have resized the window, adjust y pos of the messages.
222 [self setMessageFrames:newWindowHeight]; 222 [self setMessageFrames:newWindowHeight];
223 223
224 // Find window origin, taking into account bubble size and arrow location. 224 // Find window origin, taking into account bubble size and arrow location.
225 NSPoint origin = 225 NSPoint origin =
226 [parentWindow_ convertBaseToScreen:[self calculateArrowPoint]]; 226 [parentWindow_ convertBaseToScreen:[self calculateArrowPoint]];
227 NSSize offsets = NSMakeSize(info_bubble::kBubbleArrowXOffset + 227 NSSize offsets = NSMakeSize(info_bubble::kBubbleArrowXOffset +
228 info_bubble::kBubbleArrowWidth / 2.0, 0); 228 info_bubble::kBubbleArrowWidth / 2.0, 0);
229 offsets = [[window contentView] convertSize:offsets toView:nil]; 229 offsets = [[window contentView] convertSize:offsets toView:nil];
230 origin.x -= NSWidth([window frame]) - offsets.width; 230 origin.x -= NSWidth([window frame]) - offsets.width;
231 origin.y -= NSHeight([window frame]); 231 origin.y -= NSHeight([window frame]);
232 [window setFrameOrigin:origin]; 232 [window setFrameOrigin:origin];
233 233
234 [parentWindow_ addChildWindow:window 234 [parentWindow_ addChildWindow:window
235 ordered:NSWindowAbove]; 235 ordered:NSWindowAbove];
236 [window makeKeyAndOrderFront:self]; 236 [window makeKeyAndOrderFront:self];
237 } 237 }
238 238
(...skipping 85 matching lines...) Expand 10 before | Expand all | Expand 10 after
324 324
325 - (NSRect)getPageActionInfoMsgFrame { 325 - (NSRect)getPageActionInfoMsgFrame {
326 return [pageActionInfoMsg_ frame]; 326 return [pageActionInfoMsg_ frame];
327 } 327 }
328 328
329 - (NSRect)getExtensionInstalledInfoMsgFrame { 329 - (NSRect)getExtensionInstalledInfoMsgFrame {
330 return [extensionInstalledInfoMsg_ frame]; 330 return [extensionInstalledInfoMsg_ frame];
331 } 331 }
332 332
333 @end 333 @end
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698