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

Side by Side Diff: chrome/browser/ui/cocoa/constrained_window/constrained_window_custom_sheet.mm

Issue 1446623003: [Reland] Enable AutoResize for Constrained Web Dialogs for Mac. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase. Created 4 years, 10 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) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 "chrome/browser/ui/cocoa/constrained_window/constrained_window_custom_sh eet.h" 5 #import "chrome/browser/ui/cocoa/constrained_window/constrained_window_custom_sh eet.h"
6 6
7 #import "chrome/browser/ui/cocoa/constrained_window/constrained_window_sheet_con troller.h" 7 #import "chrome/browser/ui/cocoa/constrained_window/constrained_window_sheet_con troller.h"
8 #import "ui/base/cocoa/constrained_window/constrained_window_animation.h" 8 #import "ui/base/cocoa/constrained_window/constrained_window_animation.h"
9 9
10 @implementation CustomConstrainedWindowSheet 10 @implementation CustomConstrainedWindowSheet
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after
66 } 66 }
67 67
68 - (void)updateSheetPosition { 68 - (void)updateSheetPosition {
69 ConstrainedWindowSheetController* controller = 69 ConstrainedWindowSheetController* controller =
70 [ConstrainedWindowSheetController controllerForSheet:self]; 70 [ConstrainedWindowSheetController controllerForSheet:self];
71 NSPoint origin = [controller originForSheet:self 71 NSPoint origin = [controller originForSheet:self
72 withWindowSize:[customWindow_ frame].size]; 72 withWindowSize:[customWindow_ frame].size];
73 [customWindow_ setFrameOrigin:origin]; 73 [customWindow_ setFrameOrigin:origin];
74 } 74 }
75 75
76 - (void)resizeWithNewSize:(NSSize)size {
77 // NOOP
78 }
79
76 - (NSWindow*)sheetWindow { 80 - (NSWindow*)sheetWindow {
77 return customWindow_; 81 return customWindow_;
78 } 82 }
79 83
80 @end 84 @end
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698