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 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
47 parent_->OnVisibilityChangedTo(true); | 47 parent_->OnVisibilityChangedTo(true); |
48 } | 48 } |
49 | 49 |
50 - (void)sheetDidEnd:(NSWindow*)sheet | 50 - (void)sheetDidEnd:(NSWindow*)sheet |
51 returnCode:(NSInteger)returnCode | 51 returnCode:(NSInteger)returnCode |
52 contextInfo:(void*)contextInfo { | 52 contextInfo:(void*)contextInfo { |
53 [sheet orderOut:nil]; | 53 [sheet orderOut:nil]; |
54 parent_->OnWindowWillClose(); | 54 parent_->OnWindowWillClose(); |
55 } | 55 } |
56 | 56 |
| 57 - (BOOL)shouldRepostPendingLeftMouseDown:(NSPoint)locationInWindow { |
| 58 return parent_->ShouldRepostPendingLeftMouseDown(locationInWindow); |
| 59 } |
| 60 |
57 // NSWindowDelegate implementation. | 61 // NSWindowDelegate implementation. |
58 | 62 |
59 - (void)windowDidFailToEnterFullScreen:(NSWindow*)window { | 63 - (void)windowDidFailToEnterFullScreen:(NSWindow*)window { |
60 // Cocoa should already have sent an (unexpected) windowDidExitFullScreen: | 64 // Cocoa should already have sent an (unexpected) windowDidExitFullScreen: |
61 // notification, and the attempt to get back into fullscreen should fail. | 65 // notification, and the attempt to get back into fullscreen should fail. |
62 // Nothing to do except verify |parent_| is no longer trying to fullscreen. | 66 // Nothing to do except verify |parent_| is no longer trying to fullscreen. |
63 DCHECK(!parent_->target_fullscreen_state()); | 67 DCHECK(!parent_->target_fullscreen_state()); |
64 } | 68 } |
65 | 69 |
66 - (void)windowDidFailToExitFullScreen:(NSWindow*)window { | 70 - (void)windowDidFailToExitFullScreen:(NSWindow*)window { |
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
120 // screen in fullscreen mode. This only happens when | 124 // screen in fullscreen mode. This only happens when |
121 // -[NSWindow toggleFullscreen:] is called since non-resizable windows have no | 125 // -[NSWindow toggleFullscreen:] is called since non-resizable windows have no |
122 // fullscreen button. Without this they would only enter fullscreen at their | 126 // fullscreen button. Without this they would only enter fullscreen at their |
123 // current size. | 127 // current size. |
124 - (NSSize)window:(NSWindow*)window | 128 - (NSSize)window:(NSWindow*)window |
125 willUseFullScreenContentSize:(NSSize)proposedSize { | 129 willUseFullScreenContentSize:(NSSize)proposedSize { |
126 return proposedSize; | 130 return proposedSize; |
127 } | 131 } |
128 | 132 |
129 @end | 133 @end |
OLD | NEW |