| OLD | NEW |
| 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/views_nswindow_delegate.h" | 5 #import "ui/views/cocoa/views_nswindow_delegate.h" |
| 6 | 6 |
| 7 #include "base/logging.h" | 7 #include "base/logging.h" |
| 8 #import "ui/views/cocoa/bridged_content_view.h" | 8 #import "ui/views/cocoa/bridged_content_view.h" |
| 9 #import "ui/views/cocoa/bridged_native_widget.h" | 9 #import "ui/views/cocoa/bridged_native_widget.h" |
| 10 #include "ui/views/widget/native_widget_mac.h" | 10 #include "ui/views/widget/native_widget_mac.h" |
| (...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 43 parent_->OnSystemControlTintChanged(); | 43 parent_->OnSystemControlTintChanged(); |
| 44 } | 44 } |
| 45 | 45 |
| 46 - (void)sheetDidEnd:(NSWindow*)sheet | 46 - (void)sheetDidEnd:(NSWindow*)sheet |
| 47 returnCode:(NSInteger)returnCode | 47 returnCode:(NSInteger)returnCode |
| 48 contextInfo:(void*)contextInfo { | 48 contextInfo:(void*)contextInfo { |
| 49 [sheet orderOut:nil]; | 49 [sheet orderOut:nil]; |
| 50 parent_->OnWindowWillClose(); | 50 parent_->OnWindowWillClose(); |
| 51 } | 51 } |
| 52 | 52 |
| 53 - (BOOL)shouldRepostPendingLeftMouseDown:(NSPoint)locationInWindow { | |
| 54 return parent_->ShouldRepostPendingLeftMouseDown(locationInWindow); | |
| 55 } | |
| 56 | |
| 57 // NSWindowDelegate implementation. | 53 // NSWindowDelegate implementation. |
| 58 | 54 |
| 59 - (void)windowDidFailToEnterFullScreen:(NSWindow*)window { | 55 - (void)windowDidFailToEnterFullScreen:(NSWindow*)window { |
| 60 // Cocoa should already have sent an (unexpected) windowDidExitFullScreen: | 56 // Cocoa should already have sent an (unexpected) windowDidExitFullScreen: |
| 61 // notification, and the attempt to get back into fullscreen should fail. | 57 // notification, and the attempt to get back into fullscreen should fail. |
| 62 // Nothing to do except verify |parent_| is no longer trying to fullscreen. | 58 // Nothing to do except verify |parent_| is no longer trying to fullscreen. |
| 63 DCHECK(!parent_->target_fullscreen_state()); | 59 DCHECK(!parent_->target_fullscreen_state()); |
| 64 } | 60 } |
| 65 | 61 |
| 66 - (void)windowDidFailToExitFullScreen:(NSWindow*)window { | 62 - (void)windowDidFailToExitFullScreen:(NSWindow*)window { |
| (...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 139 usingRect:(NSRect)defaultSheetLocation { | 135 usingRect:(NSRect)defaultSheetLocation { |
| 140 // As per NSWindowDelegate documentation, the origin indicates the top left | 136 // As per NSWindowDelegate documentation, the origin indicates the top left |
| 141 // point of the host frame in window coordinates. The width changes the | 137 // point of the host frame in window coordinates. The width changes the |
| 142 // animation from vertical to trapezoid if it is smaller than the width of the | 138 // animation from vertical to trapezoid if it is smaller than the width of the |
| 143 // dialog. The height is ignored but should be set to zero. | 139 // dialog. The height is ignored but should be set to zero. |
| 144 return NSMakeRect(0, [self nativeWidgetMac]->SheetPositionY(), | 140 return NSMakeRect(0, [self nativeWidgetMac]->SheetPositionY(), |
| 145 NSWidth(defaultSheetLocation), 0); | 141 NSWidth(defaultSheetLocation), 0); |
| 146 } | 142 } |
| 147 | 143 |
| 148 @end | 144 @end |
| OLD | NEW |