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

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: Comments 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 1575 matching lines...) Expand 10 before | Expand all | Expand 10 after
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 PermissionRequestManager* manager = [self permissionRequestManager];
1595 if (manager) 1595 if (manager)
1596 manager->HideBubble(); 1596 manager->DismissBubble();
raymes 2016/10/27 01:47:52 Actually, can we just cast manager to a Permission
dominickn 2016/10/27 02:09:02 I asked felt this question. Since you're okay with
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 403 matching lines...) Expand 10 before | Expand all | Expand 10 after
2010 2010
2011 - (NSRect)savedRegularWindowFrame { 2011 - (NSRect)savedRegularWindowFrame {
2012 return savedRegularWindowFrame_; 2012 return savedRegularWindowFrame_;
2013 } 2013 }
2014 2014
2015 - (BOOL)isFullscreenTransitionInProgress { 2015 - (BOOL)isFullscreenTransitionInProgress {
2016 return enteringAppKitFullscreen_ || exitingAppKitFullscreen_; 2016 return enteringAppKitFullscreen_ || exitingAppKitFullscreen_;
2017 } 2017 }
2018 2018
2019 @end // @implementation BrowserWindowController(WindowType) 2019 @end // @implementation BrowserWindowController(WindowType)
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698