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

Unified Diff: chrome/browser/ui/cocoa/tabs/tab_strip_drag_controller.mm

Issue 1881093002: Implement Tab Detaching in Fullscreen Mode on Mac OSX (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: add to the histogram Created 4 years, 8 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/ui/cocoa/tabs/tab_strip_drag_controller.mm
diff --git a/chrome/browser/ui/cocoa/tabs/tab_strip_drag_controller.mm b/chrome/browser/ui/cocoa/tabs/tab_strip_drag_controller.mm
index dd3226976f466ae4db9f6d79abd47491153b01b4..64b8d28893ee97d3209a072e8ae783b2d56be4f4 100644
--- a/chrome/browser/ui/cocoa/tabs/tab_strip_drag_controller.mm
+++ b/chrome/browser/ui/cocoa/tabs/tab_strip_drag_controller.mm
@@ -365,8 +365,8 @@ static BOOL PointIsInsideView(NSPoint screenPoint, NSView* view) {
// to take into consideration the difference in height.
NSRect targetFrame = [[targetController_ window] frame];
NSRect sourceFrame = [dragWindow_ frame];
- origin.y = NSMinY(targetFrame) +
- (NSHeight(targetFrame) - NSHeight(sourceFrame));
+ origin.y = NSMinY(targetFrame) + [targetController_ menubarOffset] +
+ (NSHeight(targetFrame) - NSHeight(sourceFrame));
}
[dragWindow_ setFrameOrigin:
NSMakePoint(origin.x + horizDragOffset_, origin.y)];
@@ -446,7 +446,11 @@ static BOOL PointIsInsideView(NSPoint screenPoint, NSView* view) {
[draggedController_ removeOverlay];
} else {
// Only move the window around on screen. Make sure it's set back to
- // normal state (fully opaque, has shadow, has key, etc).
+ // normal state (fully opaque, has shadow, has key, in fullscreen if
+ // appropriate, etc).
+ [draggedController_
+ detachedWindowEnterFullscreenIfNeeded:sourceController_];
+
[draggedController_ removeOverlay];
// Don't want to re-show the window if it was closed during the drag.
if ([dragWindow_ isVisible]) {
« no previous file with comments | « chrome/browser/ui/cocoa/browser_window_controller_private.mm ('k') | chrome/browser/ui/cocoa/tabs/tab_window_controller.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698