| 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 | |
| 199 - (ConstrainedWindowSheetInfo*)findSheetInfoForParentView:(NSView*)parentView { | 195 - (ConstrainedWindowSheetInfo*)findSheetInfoForParentView:(NSView*)parentView { |
| 200 for (ConstrainedWindowSheetInfo* info in sheets_.get()) { | 196 for (ConstrainedWindowSheetInfo* info in sheets_.get()) { |
| 201 if ([parentView isEqual:[info parentView]]) | 197 if ([parentView isEqual:[info parentView]]) |
| 202 return info; | 198 return info; |
| 203 } | 199 } |
| 204 return NULL; | 200 return NULL; |
| 205 } | 201 } |
| 206 | 202 |
| 207 - (ConstrainedWindowSheetInfo*) | 203 - (ConstrainedWindowSheetInfo*) |
| 208 findSheetInfoForSheet:(id<ConstrainedWindowSheet>)sheet { | 204 findSheetInfoForSheet:(id<ConstrainedWindowSheet>)sheet { |
| (...skipping 88 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 297 name:NSWindowDidResizeNotification | 293 name:NSWindowDidResizeNotification |
| 298 object:parentWindow_]; | 294 object:parentWindow_]; |
| 299 | 295 |
| 300 [parentWindow_ removeChildWindow:[info overlayWindow]]; | 296 [parentWindow_ removeChildWindow:[info overlayWindow]]; |
| 301 [[info sheet] closeSheetWithAnimation:withAnimation]; | 297 [[info sheet] closeSheetWithAnimation:withAnimation]; |
| 302 [[info overlayWindow] close]; | 298 [[info overlayWindow] close]; |
| 303 [sheets_ removeObject:info]; | 299 [sheets_ removeObject:info]; |
| 304 } | 300 } |
| 305 | 301 |
| 306 @end | 302 @end |
| OLD | NEW |