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

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

Issue 1747803003: MacViews: Implement Tab Dragging (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix review issues. 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/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 61 matching lines...) Expand 10 before | Expand all | Expand 10 after
72 // windowDidExitFullScreen:. Also, failing to exit fullscreen just dumps the 72 // windowDidExitFullScreen:. Also, failing to exit fullscreen just dumps the
73 // window out of fullscreen without an animation; still sending the expected, 73 // window out of fullscreen without an animation; still sending the expected,
74 // windowDidExitFullScreen: notification. So, again, nothing to do here. 74 // windowDidExitFullScreen: notification. So, again, nothing to do here.
75 DCHECK(!parent_->target_fullscreen_state()); 75 DCHECK(!parent_->target_fullscreen_state());
76 } 76 }
77 77
78 - (void)windowDidResize:(NSNotification*)notification { 78 - (void)windowDidResize:(NSNotification*)notification {
79 parent_->OnSizeChanged(); 79 parent_->OnSizeChanged();
80 } 80 }
81 81
82 - (void)windowDidMove:(NSNotification*)notification {
83 // Note: windowDidMove: is sent only once at the end of a window drag. There
84 // is also windowWillMove: sent at the start, also once. When window is being
tapted 2016/06/06 07:12:36 nit: window -> the window
themblsha 2016/06/06 17:20:27 Done.
85 // moved by the WindowServer live updates are not provided.
86 parent_->OnPositionChanged();
87 }
88
82 - (void)windowDidBecomeKey:(NSNotification*)notification { 89 - (void)windowDidBecomeKey:(NSNotification*)notification {
83 parent_->OnWindowKeyStatusChangedTo(true); 90 parent_->OnWindowKeyStatusChangedTo(true);
84 } 91 }
85 92
86 - (void)windowDidResignKey:(NSNotification*)notification { 93 - (void)windowDidResignKey:(NSNotification*)notification {
87 parent_->OnWindowKeyStatusChangedTo(false); 94 parent_->OnWindowKeyStatusChangedTo(false);
88 } 95 }
89 96
90 - (void)windowWillClose:(NSNotification*)notification { 97 - (void)windowWillClose:(NSNotification*)notification {
91 DCHECK([parent_->ns_window() isEqual:[notification object]]); 98 DCHECK([parent_->ns_window() isEqual:[notification object]]);
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after
136 usingRect:(NSRect)defaultSheetLocation { 143 usingRect:(NSRect)defaultSheetLocation {
137 // As per NSWindowDelegate documentation, the origin indicates the top left 144 // As per NSWindowDelegate documentation, the origin indicates the top left
138 // point of the host frame in window coordinates. The width changes the 145 // point of the host frame in window coordinates. The width changes the
139 // animation from vertical to trapezoid if it is smaller than the width of the 146 // animation from vertical to trapezoid if it is smaller than the width of the
140 // dialog. The height is ignored but should be set to zero. 147 // dialog. The height is ignored but should be set to zero.
141 return NSMakeRect(0, [self nativeWidgetMac]->SheetPositionY(), 148 return NSMakeRect(0, [self nativeWidgetMac]->SheetPositionY(),
142 NSWidth(defaultSheetLocation), 0); 149 NSWidth(defaultSheetLocation), 0);
143 } 150 }
144 151
145 @end 152 @end
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698