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

Side by Side Diff: chrome/browser/ui/cocoa/certificate_viewer_mac.mm

Issue 1495623008: Polish Tabstrip and Overlay Issues in Fullscreen (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: SSLCertificateViewerCocoaTest fixed Created 5 years 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/certificate_viewer_mac.h" 5 #import "chrome/browser/ui/cocoa/certificate_viewer_mac.h"
6 6
7 #include <Security/Security.h> 7 #include <Security/Security.h>
8 #include <SecurityInterface/SFCertificatePanel.h> 8 #include <SecurityInterface/SFCertificatePanel.h>
9 #include <vector> 9 #include <vector>
10 10
(...skipping 149 matching lines...) Expand 10 before | Expand all | Expand 10 after
160 // method. 160 // method.
161 [panel_ _dismissWithCode:NSFileHandlingPanelCancelButton]; 161 [panel_ _dismissWithCode:NSFileHandlingPanelCancelButton];
162 } 162 }
163 163
164 - (void)hideSheet { 164 - (void)hideSheet {
165 NSWindow* sheetWindow = [overlayWindow_ attachedSheet]; 165 NSWindow* sheetWindow = [overlayWindow_ attachedSheet];
166 [sheetWindow setAlphaValue:0.0]; 166 [sheetWindow setAlphaValue:0.0];
167 167
168 oldResizesSubviews_ = [[sheetWindow contentView] autoresizesSubviews]; 168 oldResizesSubviews_ = [[sheetWindow contentView] autoresizesSubviews];
169 [[sheetWindow contentView] setAutoresizesSubviews:NO]; 169 [[sheetWindow contentView] setAutoresizesSubviews:NO];
170
171 oldSheetFrame_ = [sheetWindow frame];
172 NSRect overlayFrame = [overlayWindow_ frame];
173 oldSheetFrame_.origin.x -= NSMinX(overlayFrame);
174 oldSheetFrame_.origin.y -= NSMinY(overlayFrame);
175 [sheetWindow setFrame:ui::kWindowSizeDeterminedLater display:NO];
176 } 170 }
177 171
178 - (void)unhideSheet { 172 - (void)unhideSheet {
179 NSWindow* sheetWindow = [overlayWindow_ attachedSheet]; 173 NSWindow* sheetWindow = [overlayWindow_ attachedSheet];
180 NSRect overlayFrame = [overlayWindow_ frame]; 174
181 oldSheetFrame_.origin.x += NSMinX(overlayFrame);
182 oldSheetFrame_.origin.y += NSMinY(overlayFrame);
183 [sheetWindow setFrame:oldSheetFrame_ display:NO];
184 [[sheetWindow contentView] setAutoresizesSubviews:oldResizesSubviews_]; 175 [[sheetWindow contentView] setAutoresizesSubviews:oldResizesSubviews_];
185 [[overlayWindow_ attachedSheet] setAlphaValue:1.0]; 176 [[overlayWindow_ attachedSheet] setAlphaValue:1.0];
186 } 177 }
187 178
188 - (void)pulseSheet { 179 - (void)pulseSheet {
189 // NOOP 180 // NOOP
190 } 181 }
191 182
192 - (void)makeSheetKeyAndOrderFront { 183 - (void)makeSheetKeyAndOrderFront {
193 [[overlayWindow_ attachedSheet] makeKeyAndOrderFront:nil]; 184 [[overlayWindow_ attachedSheet] makeKeyAndOrderFront:nil];
194 } 185 }
195 186
196 - (void)updateSheetPosition { 187 - (void)updateSheetPosition {
197 // NOOP 188 // NOOP
198 } 189 }
199 190
200 - (NSWindow*)sheetWindow { 191 - (NSWindow*)sheetWindow {
201 return panel_; 192 return panel_;
202 } 193 }
203 194
204 - (void)onConstrainedWindowClosed { 195 - (void)onConstrainedWindowClosed {
205 panel_.reset(); 196 panel_.reset();
206 constrainedWindow_.reset(); 197 constrainedWindow_.reset();
207 [self release]; 198 [self release];
208 } 199 }
209 200
210 @end 201 @end
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698