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

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

Issue 502413004: Mac: Update sheet position when bookmark bar is shown or hidden. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 3 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
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
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
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