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

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

Issue 653733002: Revert of Mac: Update sheet position when bookmark bar is shown or hidden. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase Created 6 years, 2 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
« no previous file with comments | « chrome/browser/ui/cocoa/constrained_window/constrained_window_sheet_controller.h ('k') | no next file » | 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) 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
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
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
OLDNEW
« no previous file with comments | « chrome/browser/ui/cocoa/constrained_window/constrained_window_sheet_controller.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698