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

Side by Side Diff: ui/views/widget/native_widget_mac.mm

Issue 1747803003: MacViews: Implement Tab Dragging (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix include. 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
« no previous file with comments | « ui/views/views.gyp ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 #include "ui/views/widget/native_widget_mac.h" 5 #include "ui/views/widget/native_widget_mac.h"
6 6
7 #import <Cocoa/Cocoa.h> 7 #import <Cocoa/Cocoa.h>
8 8
9 #include <utility> 9 #include <utility>
10 10
(...skipping 533 matching lines...) Expand 10 before | Expand all | Expand 10 after
544 } 544 }
545 545
546 gfx::Rect NativeWidgetMac::GetWorkAreaBoundsInScreen() const { 546 gfx::Rect NativeWidgetMac::GetWorkAreaBoundsInScreen() const {
547 return gfx::ScreenRectFromNSRect([[GetNativeWindow() screen] visibleFrame]); 547 return gfx::ScreenRectFromNSRect([[GetNativeWindow() screen] visibleFrame]);
548 } 548 }
549 549
550 Widget::MoveLoopResult NativeWidgetMac::RunMoveLoop( 550 Widget::MoveLoopResult NativeWidgetMac::RunMoveLoop(
551 const gfx::Vector2d& drag_offset, 551 const gfx::Vector2d& drag_offset,
552 Widget::MoveLoopSource source, 552 Widget::MoveLoopSource source,
553 Widget::MoveLoopEscapeBehavior escape_behavior) { 553 Widget::MoveLoopEscapeBehavior escape_behavior) {
554 NOTIMPLEMENTED(); 554 if (!bridge_)
555 return Widget::MOVE_LOOP_CANCELED; 555 return Widget::MOVE_LOOP_CANCELED;
556
557 return bridge_->RunMoveLoop(drag_offset);
556 } 558 }
557 559
558 void NativeWidgetMac::EndMoveLoop() { 560 void NativeWidgetMac::EndMoveLoop() {
559 NOTIMPLEMENTED(); 561 if (bridge_)
562 bridge_->EndMoveLoop();
560 } 563 }
561 564
562 void NativeWidgetMac::SetVisibilityChangedAnimationsEnabled(bool value) { 565 void NativeWidgetMac::SetVisibilityChangedAnimationsEnabled(bool value) {
563 NOTIMPLEMENTED(); 566 NOTIMPLEMENTED();
564 } 567 }
565 568
566 void NativeWidgetMac::SetVisibilityAnimationDuration( 569 void NativeWidgetMac::SetVisibilityAnimationDuration(
567 const base::TimeDelta& duration) { 570 const base::TimeDelta& duration) {
568 NOTIMPLEMENTED(); 571 NOTIMPLEMENTED();
569 } 572 }
(...skipping 177 matching lines...) Expand 10 before | Expand all | Expand 10 after
747 [[ViewsNSWindowCloseAnimator alloc] initWithWindow:window]; 750 [[ViewsNSWindowCloseAnimator alloc] initWithWindow:window];
748 } 751 }
749 752
750 - (void)animationDidEnd:(NSAnimation*)animation { 753 - (void)animationDidEnd:(NSAnimation*)animation {
751 [window_ close]; 754 [window_ close];
752 [animation_ setDelegate:nil]; 755 [animation_ setDelegate:nil];
753 [self release]; 756 [self release];
754 } 757 }
755 758
756 @end 759 @end
OLDNEW
« no previous file with comments | « ui/views/views.gyp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698