| OLD | NEW |
| 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 Loading... |
| 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 Loading... |
| 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) |
| OLD | NEW |