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

Side by Side Diff: chrome/browser/ui/cocoa/website_settings/permission_bubble_controller.mm

Issue 324223002: Permission bubble should not be key window when it appears. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 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 | 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 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/website_settings/permission_bubble_controller.h " 5 #import "chrome/browser/ui/cocoa/website_settings/permission_bubble_controller.h "
6 6
7 #include <algorithm> 7 #include <algorithm>
8 8
9 #include "base/mac/bind_objc_block.h" 9 #include "base/mac/bind_objc_block.h"
10 #include "base/mac/foundation_util.h" 10 #include "base/mac/foundation_util.h"
(...skipping 200 matching lines...) Expand 10 before | Expand all | Expand 10 after
211 [[PermissionBubbleWindow alloc] 211 [[PermissionBubbleWindow alloc]
212 initWithContentRect:ui::kWindowSizeDeterminedLater 212 initWithContentRect:ui::kWindowSizeDeterminedLater
213 styleMask:NSBorderlessWindowMask 213 styleMask:NSBorderlessWindowMask
214 backing:NSBackingStoreBuffered 214 backing:NSBackingStoreBuffered
215 defer:NO]); 215 defer:NO]);
216 [window setAllowedAnimations:info_bubble::kAnimateNone]; 216 [window setAllowedAnimations:info_bubble::kAnimateNone];
217 if ((self = [super initWithWindow:window 217 if ((self = [super initWithWindow:window
218 parentWindow:parentWindow 218 parentWindow:parentWindow
219 anchoredAt:NSZeroPoint])) { 219 anchoredAt:NSZeroPoint])) {
220 [self setShouldCloseOnResignKey:NO]; 220 [self setShouldCloseOnResignKey:NO];
221 [self setShouldOpenAsKeyWindow:NO];
221 [[self bubble] setArrowLocation:info_bubble::kTopLeft]; 222 [[self bubble] setArrowLocation:info_bubble::kTopLeft];
222 bridge_ = bridge; 223 bridge_ = bridge;
223 } 224 }
224 return self; 225 return self;
225 } 226 }
226 227
227 - (void)windowWillClose:(NSNotification*)notification { 228 - (void)windowWillClose:(NSNotification*)notification {
228 bridge_->OnBubbleClosing(); 229 bridge_->OnBubbleClosing();
229 [super windowWillClose:notification]; 230 [super windowWillClose:notification];
230 } 231 }
(...skipping 311 matching lines...) Expand 10 before | Expand all | Expand 10 after
542 543
543 + (void)alignCenterOf:(NSView*)viewA verticallyToCenterOf:(NSView*)viewB { 544 + (void)alignCenterOf:(NSView*)viewA verticallyToCenterOf:(NSView*)viewB {
544 NSRect frameA = [viewA frame]; 545 NSRect frameA = [viewA frame];
545 NSRect frameB = [viewB frame]; 546 NSRect frameB = [viewB frame];
546 frameA.origin.y = 547 frameA.origin.y =
547 NSMinY(frameB) + std::floor((NSHeight(frameB) - NSHeight(frameA)) / 2); 548 NSMinY(frameB) + std::floor((NSHeight(frameB) - NSHeight(frameA)) / 2);
548 [viewA setFrameOrigin:frameA.origin]; 549 [viewA setFrameOrigin:frameA.origin];
549 } 550 }
550 551
551 @end // implementation PermissionBubbleController 552 @end // implementation PermissionBubbleController
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698