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

Side by Side Diff: ui/views/cocoa/native_widget_mac_nswindow.mm

Issue 2069103004: MacViews: Attach child windows when parent is on the screen. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 6 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
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 "ui/views/cocoa/native_widget_mac_nswindow.h" 5 #import "ui/views/cocoa/native_widget_mac_nswindow.h"
6 6
7 #include "base/mac/foundation_util.h" 7 #include "base/mac/foundation_util.h"
8 #import "ui/views/cocoa/bridged_native_widget.h" 8 #import "ui/views/cocoa/bridged_native_widget.h"
9 #import "ui/base/cocoa/user_interface_item_command_handler.h" 9 #import "ui/base/cocoa/user_interface_item_command_handler.h"
10 #import "ui/views/cocoa/views_nswindow_delegate.h" 10 #import "ui/views/cocoa/views_nswindow_delegate.h"
(...skipping 124 matching lines...) Expand 10 before | Expand all | Expand 10 after
135 [[self viewsNSWindowDelegate] onWindowWillDisplay]; 135 [[self viewsNSWindowDelegate] onWindowWillDisplay];
136 [super display]; 136 [super display];
137 } 137 }
138 138
139 // Override window order functions to intercept other visibility changes. This 139 // Override window order functions to intercept other visibility changes. This
140 // is needed in addition to the -[NSWindow display] override because Cocoa 140 // is needed in addition to the -[NSWindow display] override because Cocoa
141 // hardly ever calls display, and reports -[NSWindow isVisible] incorrectly 141 // hardly ever calls display, and reports -[NSWindow isVisible] incorrectly
142 // when ordering in a window for the first time. 142 // when ordering in a window for the first time.
143 - (void)orderWindow:(NSWindowOrderingMode)orderingMode 143 - (void)orderWindow:(NSWindowOrderingMode)orderingMode
144 relativeTo:(NSInteger)otherWindowNumber { 144 relativeTo:(NSInteger)otherWindowNumber {
145 [[self viewsNSWindowDelegate] onWindowOrderWillChange:orderingMode];
146 [super orderWindow:orderingMode relativeTo:otherWindowNumber]; 145 [super orderWindow:orderingMode relativeTo:otherWindowNumber];
147 [[self viewsNSWindowDelegate] onWindowOrderChanged:nil]; 146 [[self viewsNSWindowDelegate] onWindowOrderChanged:nil];
148 } 147 }
149 148
150 // NSResponder implementation. 149 // NSResponder implementation.
151 150
152 - (BOOL)performKeyEquivalent:(NSEvent*)event { 151 - (BOOL)performKeyEquivalent:(NSEvent*)event {
153 return [commandDispatcher_ performKeyEquivalent:event]; 152 return [commandDispatcher_ performKeyEquivalent:event];
154 } 153 }
155 154
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after
209 id appController = [NSApp delegate]; 208 id appController = [NSApp delegate];
210 DCHECK([appController 209 DCHECK([appController
211 conformsToProtocol:@protocol(NSUserInterfaceValidations)]); 210 conformsToProtocol:@protocol(NSUserInterfaceValidations)]);
212 return [appController validateUserInterfaceItem:item]; 211 return [appController validateUserInterfaceItem:item];
213 } 212 }
214 213
215 return [super validateUserInterfaceItem:item]; 214 return [super validateUserInterfaceItem:item];
216 } 215 }
217 216
218 @end 217 @end
OLDNEW
« no previous file with comments | « no previous file | ui/views/cocoa/views_nswindow_delegate.h » ('j') | ui/views/cocoa/views_nswindow_delegate.mm » ('J')

Powered by Google App Engine
This is Rietveld 408576698