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

Side by Side Diff: chrome/browser/ui/cocoa/panels/panel_window_controller_cocoa.mm

Issue 1575743003: Mac: Remove a case where panels may become key when an autofill popup closes (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Remove poopie code from chrome_browser_application_mac.mm Created 4 years, 11 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 | « chrome/browser/chrome_browser_application_mac.mm ('k') | 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 (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 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 #include "chrome/browser/ui/cocoa/panels/panel_window_controller_cocoa.h" 5 #include "chrome/browser/ui/cocoa/panels/panel_window_controller_cocoa.h"
6 6
7 #import <Cocoa/Cocoa.h> 7 #import <Cocoa/Cocoa.h>
8 8
9 #include "base/auto_reset.h" 9 #include "base/auto_reset.h"
10 #include "base/logging.h" 10 #include "base/logging.h"
(...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after
88 BrowserCrApplication* app = base::mac::ObjCCast<BrowserCrApplication>( 88 BrowserCrApplication* app = base::mac::ObjCCast<BrowserCrApplication>(
89 [BrowserCrApplication sharedApplication]); 89 [BrowserCrApplication sharedApplication]);
90 90
91 // A Panel window can become the key window only in limited scenarios. 91 // A Panel window can become the key window only in limited scenarios.
92 // This prevents the system from always preferring a Panel window due 92 // This prevents the system from always preferring a Panel window due
93 // to its higher priority NSWindowLevel when selecting a window to make key. 93 // to its higher priority NSWindowLevel when selecting a window to make key.
94 return ([app isHandlingSendEvent] && [[app currentEvent] window] == self) || 94 return ([app isHandlingSendEvent] && [[app currentEvent] window] == self) ||
95 [controller activationRequestedByPanel] || 95 [controller activationRequestedByPanel] ||
96 [app isCyclingWindows] || 96 [app isCyclingWindows] ||
97 [self isKeyWindow] || 97 [self isKeyWindow] ||
98 [app previousKeyWindow] == self ||
99 [[app windows] count] == static_cast<NSUInteger>([controller numPanels]); 98 [[app windows] count] == static_cast<NSUInteger>([controller numPanels]);
100 } 99 }
101 100
102 - (void)performMiniaturize:(id)sender { 101 - (void)performMiniaturize:(id)sender {
103 [[self windowController] minimizeButtonClicked:0]; 102 [[self windowController] minimizeButtonClicked:0];
104 } 103 }
105 104
106 - (void)mouseMoved:(NSEvent*)event { 105 - (void)mouseMoved:(NSEvent*)event {
107 // Cocoa does not support letting the application determine the edges that 106 // Cocoa does not support letting the application determine the edges that
108 // can trigger the user resizing. To work around this, we track the mouse 107 // can trigger the user resizing. To work around this, we track the mouse
(...skipping 848 matching lines...) Expand 10 before | Expand all | Expand 10 after
957 if (![window canBecomeKeyWindow]) 956 if (![window canBecomeKeyWindow])
958 continue; 957 continue;
959 958
960 [window makeKeyWindow]; 959 [window makeKeyWindow];
961 } 960 }
962 return; 961 return;
963 } 962 }
964 } 963 }
965 964
966 @end 965 @end
OLDNEW
« no previous file with comments | « chrome/browser/chrome_browser_application_mac.mm ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698