| 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 606 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 617 | 617 |
| 618 - (void)windowDidResignMain:(NSNotification*)notification { | 618 - (void)windowDidResignMain:(NSNotification*)notification { |
| 619 NSView* rootView = [[[self window] contentView] superview]; | 619 NSView* rootView = [[[self window] contentView] superview]; |
| 620 [rootView cr_recursivelyInvokeBlock:^(id view) { | 620 [rootView cr_recursivelyInvokeBlock:^(id view) { |
| 621 if ([view conformsToProtocol:@protocol(ThemedWindowDrawing)]) | 621 if ([view conformsToProtocol:@protocol(ThemedWindowDrawing)]) |
| 622 [view windowDidChangeActive]; | 622 [view windowDidChangeActive]; |
| 623 }]; | 623 }]; |
| 624 | 624 |
| 625 extensions::ExtensionCommandsGlobalRegistry::Get(browser_->profile()) | 625 extensions::ExtensionCommandsGlobalRegistry::Get(browser_->profile()) |
| 626 ->set_registry_for_active_window(nullptr); | 626 ->set_registry_for_active_window(nullptr); |
| 627 |
| 628 BrowserList::NotifyBrowserNoLongerActive(browser_.get()); |
| 627 } | 629 } |
| 628 | 630 |
| 629 // Called when we have been minimized. | 631 // Called when we have been minimized. |
| 630 - (void)windowDidMiniaturize:(NSNotification *)notification { | 632 - (void)windowDidMiniaturize:(NSNotification *)notification { |
| 631 [self saveWindowPositionIfNeeded]; | 633 [self saveWindowPositionIfNeeded]; |
| 632 } | 634 } |
| 633 | 635 |
| 634 // Called when we have been unminimized. | 636 // Called when we have been unminimized. |
| 635 - (void)windowDidDeminiaturize:(NSNotification *)notification { | 637 - (void)windowDidDeminiaturize:(NSNotification *)notification { |
| 636 // Make sure the window's show_state (which is now ui::SHOW_STATE_NORMAL) | 638 // Make sure the window's show_state (which is now ui::SHOW_STATE_NORMAL) |
| (...skipping 1416 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2053 | 2055 |
| 2054 - (NSRect)savedRegularWindowFrame { | 2056 - (NSRect)savedRegularWindowFrame { |
| 2055 return savedRegularWindowFrame_; | 2057 return savedRegularWindowFrame_; |
| 2056 } | 2058 } |
| 2057 | 2059 |
| 2058 - (BOOL)isFullscreenTransitionInProgress { | 2060 - (BOOL)isFullscreenTransitionInProgress { |
| 2059 return enteringAppKitFullscreen_ || exitingAppKitFullscreen_; | 2061 return enteringAppKitFullscreen_ || exitingAppKitFullscreen_; |
| 2060 } | 2062 } |
| 2061 | 2063 |
| 2062 @end // @implementation BrowserWindowController(WindowType) | 2064 @end // @implementation BrowserWindowController(WindowType) |
| OLD | NEW |