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 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
110 | 114 |
111 - (void)windowWillExitFullScreen:(NSNotification*)notification { | 115 - (void)windowWillExitFullScreen:(NSNotification*)notification { |
112 parent_->OnFullscreenTransitionStart(false); | 116 parent_->OnFullscreenTransitionStart(false); |
113 } | 117 } |
114 | 118 |
115 - (void)windowDidExitFullScreen:(NSNotification*)notification { | 119 - (void)windowDidExitFullScreen:(NSNotification*)notification { |
116 parent_->OnFullscreenTransitionComplete(false); | 120 parent_->OnFullscreenTransitionComplete(false); |
117 } | 121 } |
118 | 122 |
119 @end | 123 @end |
OLD | NEW |