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

Side by Side Diff: chrome/browser/ui/cocoa/autofill/autofill_popup_base_view_cocoa.mm

Issue 1154013009: [OSX] Don't create deferred windows. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 6 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 | « no previous file | chrome/browser/ui/cocoa/base_bubble_controller_unittest.mm » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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/autofill/autofill_popup_base_view_cocoa.h" 5 #import "chrome/browser/ui/cocoa/autofill/autofill_popup_base_view_cocoa.h"
6 6
7 #include "chrome/browser/ui/autofill/autofill_popup_view_delegate.h" 7 #include "chrome/browser/ui/autofill/autofill_popup_view_delegate.h"
8 #include "chrome/browser/ui/autofill/popup_constants.h" 8 #include "chrome/browser/ui/autofill/popup_constants.h"
9 #include "ui/base/cocoa/window_size_constants.h" 9 #include "ui/base/cocoa/window_size_constants.h"
10 10
(...skipping 135 matching lines...) Expand 10 before | Expand all | Expand 10 after
146 // big to fit on the screen. 146 // big to fit on the screen.
147 [[self window] setFrame:frame display:YES]; 147 [[self window] setFrame:frame display:YES];
148 [self setNeedsDisplay:YES]; 148 [self setNeedsDisplay:YES];
149 } 149 }
150 150
151 - (void)showPopup { 151 - (void)showPopup {
152 NSWindow* window = 152 NSWindow* window =
153 [[NSWindow alloc] initWithContentRect:ui::kWindowSizeDeterminedLater 153 [[NSWindow alloc] initWithContentRect:ui::kWindowSizeDeterminedLater
154 styleMask:NSBorderlessWindowMask 154 styleMask:NSBorderlessWindowMask
155 backing:NSBackingStoreBuffered 155 backing:NSBackingStoreBuffered
156 defer:YES]; 156 defer:NO];
157 [window setContentView:self]; 157 [window setContentView:self];
158 158
159 // Telling Cocoa that the window is opaque enables some drawing optimizations. 159 // Telling Cocoa that the window is opaque enables some drawing optimizations.
160 [window setOpaque:YES]; 160 [window setOpaque:YES];
161 161
162 [self updateBoundsAndRedrawPopup]; 162 [self updateBoundsAndRedrawPopup];
163 [[delegate_->container_view() window] addChildWindow:window 163 [[delegate_->container_view() window] addChildWindow:window
164 ordered:NSWindowAbove]; 164 ordered:NSWindowAbove];
165 } 165 }
166 166
167 - (void)hidePopup { 167 - (void)hidePopup {
168 // Remove the child window before closing, otherwise it can mess up 168 // Remove the child window before closing, otherwise it can mess up
169 // display ordering. 169 // display ordering.
170 NSWindow* window = [self window]; 170 NSWindow* window = [self window];
171 [[window parentWindow] removeChildWindow:window]; 171 [[window parentWindow] removeChildWindow:window];
172 [window close]; 172 [window close];
173 } 173 }
174 174
175 @end 175 @end
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/ui/cocoa/base_bubble_controller_unittest.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698