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

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

Issue 2403763003: [Mac] Address buggy permission bubble behaviour on dismissal via ESC. (Closed)
Patch Set: Use Closing Created 4 years, 1 month 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 2012 The Chromium Authors. All rights reserved. 1 // Copyright 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/browser_window_controller.h" 5 #import "chrome/browser/ui/cocoa/browser_window_controller.h"
6 6
7 #include <cmath> 7 #include <cmath>
8 #include <numeric> 8 #include <numeric>
9 #include <utility> 9 #include <utility>
10 10
(...skipping 1573 matching lines...) Expand 10 before | Expand all | Expand 10 after
1584 [translateBubbleController_ showWindow:nil]; 1584 [translateBubbleController_ showWindow:nil];
1585 1585
1586 NSNotificationCenter* center = [NSNotificationCenter defaultCenter]; 1586 NSNotificationCenter* center = [NSNotificationCenter defaultCenter];
1587 [center addObserver:self 1587 [center addObserver:self
1588 selector:@selector(translateBubbleWindowWillClose:) 1588 selector:@selector(translateBubbleWindowWillClose:)
1589 name:NSWindowWillCloseNotification 1589 name:NSWindowWillCloseNotification
1590 object:[translateBubbleController_ window]]; 1590 object:[translateBubbleController_ window]];
1591 } 1591 }
1592 1592
1593 - (void)dismissPermissionBubble { 1593 - (void)dismissPermissionBubble {
1594 PermissionRequestManager* manager = [self permissionRequestManager]; 1594 PermissionPrompt::Delegate* delegate = [self permissionRequestManager];
1595 if (manager) 1595 if (delegate)
1596 manager->HideBubble(); 1596 delegate->Closing();
1597 } 1597 }
1598 1598
1599 // Nil out the weak translate bubble controller reference. 1599 // Nil out the weak translate bubble controller reference.
1600 - (void)translateBubbleWindowWillClose:(NSNotification*)notification { 1600 - (void)translateBubbleWindowWillClose:(NSNotification*)notification {
1601 DCHECK_EQ([notification object], [translateBubbleController_ window]); 1601 DCHECK_EQ([notification object], [translateBubbleController_ window]);
1602 1602
1603 NSNotificationCenter* center = [NSNotificationCenter defaultCenter]; 1603 NSNotificationCenter* center = [NSNotificationCenter defaultCenter];
1604 [center removeObserver:self 1604 [center removeObserver:self
1605 name:NSWindowWillCloseNotification 1605 name:NSWindowWillCloseNotification
1606 object:[translateBubbleController_ window]]; 1606 object:[translateBubbleController_ window]];
(...skipping 400 matching lines...) Expand 10 before | Expand all | Expand 10 after
2007 2007
2008 - (NSRect)savedRegularWindowFrame { 2008 - (NSRect)savedRegularWindowFrame {
2009 return savedRegularWindowFrame_; 2009 return savedRegularWindowFrame_;
2010 } 2010 }
2011 2011
2012 - (BOOL)isFullscreenTransitionInProgress { 2012 - (BOOL)isFullscreenTransitionInProgress {
2013 return enteringAppKitFullscreen_ || exitingAppKitFullscreen_; 2013 return enteringAppKitFullscreen_ || exitingAppKitFullscreen_;
2014 } 2014 }
2015 2015
2016 @end // @implementation BrowserWindowController(WindowType) 2016 @end // @implementation BrowserWindowController(WindowType)
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698