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 29 matching lines...) Expand all Loading... |
40 } | 40 } |
41 | 41 |
42 - (void)onWindowOrderChanged:(NSNotification*)notification { | 42 - (void)onWindowOrderChanged:(NSNotification*)notification { |
43 parent_->OnVisibilityChanged(); | 43 parent_->OnVisibilityChanged(); |
44 } | 44 } |
45 | 45 |
46 - (void)onWindowWillDisplay { | 46 - (void)onWindowWillDisplay { |
47 parent_->OnVisibilityChangedTo(true); | 47 parent_->OnVisibilityChangedTo(true); |
48 } | 48 } |
49 | 49 |
| 50 - (void)sheetDidEnd:(NSWindow*)sheet |
| 51 returnCode:(NSInteger)returnCode |
| 52 contextInfo:(void*)contextInfo { |
| 53 [sheet orderOut:nil]; |
| 54 parent_->OnWindowWillClose(); |
| 55 } |
| 56 |
50 // NSWindowDelegate implementation. | 57 // NSWindowDelegate implementation. |
51 | 58 |
52 - (void)windowDidFailToEnterFullScreen:(NSWindow*)window { | 59 - (void)windowDidFailToEnterFullScreen:(NSWindow*)window { |
53 // Cocoa should already have sent an (unexpected) windowDidExitFullScreen: | 60 // Cocoa should already have sent an (unexpected) windowDidExitFullScreen: |
54 // notification, and the attempt to get back into fullscreen should fail. | 61 // notification, and the attempt to get back into fullscreen should fail. |
55 // Nothing to do except verify |parent_| is no longer trying to fullscreen. | 62 // Nothing to do except verify |parent_| is no longer trying to fullscreen. |
56 DCHECK(!parent_->target_fullscreen_state()); | 63 DCHECK(!parent_->target_fullscreen_state()); |
57 } | 64 } |
58 | 65 |
59 - (void)windowDidFailToExitFullScreen:(NSWindow*)window { | 66 - (void)windowDidFailToExitFullScreen:(NSWindow*)window { |
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
103 | 110 |
104 - (void)windowWillExitFullScreen:(NSNotification*)notification { | 111 - (void)windowWillExitFullScreen:(NSNotification*)notification { |
105 parent_->OnFullscreenTransitionStart(false); | 112 parent_->OnFullscreenTransitionStart(false); |
106 } | 113 } |
107 | 114 |
108 - (void)windowDidExitFullScreen:(NSNotification*)notification { | 115 - (void)windowDidExitFullScreen:(NSNotification*)notification { |
109 parent_->OnFullscreenTransitionComplete(false); | 116 parent_->OnFullscreenTransitionComplete(false); |
110 } | 117 } |
111 | 118 |
112 @end | 119 @end |
OLD | NEW |