OLD | NEW |
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_sheet_con
troller.h" | 5 #import "chrome/browser/ui/cocoa/constrained_window/constrained_window_sheet_con
troller.h" |
6 | 6 |
7 #include <map> | 7 #include <map> |
8 | 8 |
9 #include "base/logging.h" | 9 #include "base/logging.h" |
10 #import "chrome/browser/ui/cocoa/constrained_window/constrained_window_sheet.h" | 10 #import "chrome/browser/ui/cocoa/constrained_window/constrained_window_sheet.h" |
(...skipping 174 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
185 ConstrainedWindowSheetInfo* info = [self findSheetInfoForSheet:sheet]; | 185 ConstrainedWindowSheetInfo* info = [self findSheetInfoForSheet:sheet]; |
186 DCHECK(info); | 186 DCHECK(info); |
187 if ([activeView_ isEqual:[info parentView]]) | 187 if ([activeView_ isEqual:[info parentView]]) |
188 [[info sheet] pulseSheet]; | 188 [[info sheet] pulseSheet]; |
189 } | 189 } |
190 | 190 |
191 - (int)sheetCount { | 191 - (int)sheetCount { |
192 return [sheets_ count]; | 192 return [sheets_ count]; |
193 } | 193 } |
194 | 194 |
| 195 - (void)updateSheetPosition { |
| 196 [self updateSheetPosition:activeView_]; |
| 197 } |
| 198 |
195 - (ConstrainedWindowSheetInfo*)findSheetInfoForParentView:(NSView*)parentView { | 199 - (ConstrainedWindowSheetInfo*)findSheetInfoForParentView:(NSView*)parentView { |
196 for (ConstrainedWindowSheetInfo* info in sheets_.get()) { | 200 for (ConstrainedWindowSheetInfo* info in sheets_.get()) { |
197 if ([parentView isEqual:[info parentView]]) | 201 if ([parentView isEqual:[info parentView]]) |
198 return info; | 202 return info; |
199 } | 203 } |
200 return NULL; | 204 return NULL; |
201 } | 205 } |
202 | 206 |
203 - (ConstrainedWindowSheetInfo*) | 207 - (ConstrainedWindowSheetInfo*) |
204 findSheetInfoForSheet:(id<ConstrainedWindowSheet>)sheet { | 208 findSheetInfoForSheet:(id<ConstrainedWindowSheet>)sheet { |
(...skipping 88 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
293 name:NSWindowDidResizeNotification | 297 name:NSWindowDidResizeNotification |
294 object:parentWindow_]; | 298 object:parentWindow_]; |
295 | 299 |
296 [parentWindow_ removeChildWindow:[info overlayWindow]]; | 300 [parentWindow_ removeChildWindow:[info overlayWindow]]; |
297 [[info sheet] closeSheetWithAnimation:withAnimation]; | 301 [[info sheet] closeSheetWithAnimation:withAnimation]; |
298 [[info overlayWindow] close]; | 302 [[info overlayWindow] close]; |
299 [sheets_ removeObject:info]; | 303 [sheets_ removeObject:info]; |
300 } | 304 } |
301 | 305 |
302 @end | 306 @end |
OLD | NEW |