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

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

Issue 1146873002: [MacViews] Enable dragging a window by its caption/draggable areas. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Sync and rebase Created 5 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/widget/native_widget_mac.h ('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 "base/mac/foundation_util.h" 9 #include "base/mac/foundation_util.h"
10 #include "base/mac/scoped_nsobject.h" 10 #include "base/mac/scoped_nsobject.h"
(...skipping 26 matching lines...) Expand all
37 namespace views { 37 namespace views {
38 namespace { 38 namespace {
39 39
40 NSInteger StyleMaskForParams(const Widget::InitParams& params) { 40 NSInteger StyleMaskForParams(const Widget::InitParams& params) {
41 // TODO(tapted): Determine better masks when there are use cases for it. 41 // TODO(tapted): Determine better masks when there are use cases for it.
42 if (params.remove_standard_frame) 42 if (params.remove_standard_frame)
43 return NSBorderlessWindowMask; 43 return NSBorderlessWindowMask;
44 44
45 if (params.type == Widget::InitParams::TYPE_WINDOW) { 45 if (params.type == Widget::InitParams::TYPE_WINDOW) {
46 return NSTitledWindowMask | NSClosableWindowMask | 46 return NSTitledWindowMask | NSClosableWindowMask |
47 NSMiniaturizableWindowMask | NSResizableWindowMask; 47 NSMiniaturizableWindowMask | NSResizableWindowMask |
48 NSTexturedBackgroundWindowMask;
48 } 49 }
49 return NSBorderlessWindowMask; 50 return NSBorderlessWindowMask;
50 } 51 }
51 52
52 } // namespace 53 } // namespace
53 54
54 //////////////////////////////////////////////////////////////////////////////// 55 ////////////////////////////////////////////////////////////////////////////////
55 // NativeWidgetMac, public: 56 // NativeWidgetMac, public:
56 57
57 NativeWidgetMac::NativeWidgetMac(internal::NativeWidgetDelegate* delegate) 58 NativeWidgetMac::NativeWidgetMac(internal::NativeWidgetDelegate* delegate)
(...skipping 631 matching lines...) Expand 10 before | Expand all | Expand 10 after
689 [[ViewsNSWindowCloseAnimator alloc] initWithWindow:window]; 690 [[ViewsNSWindowCloseAnimator alloc] initWithWindow:window];
690 } 691 }
691 692
692 - (void)animationDidEnd:(NSAnimation*)animation { 693 - (void)animationDidEnd:(NSAnimation*)animation {
693 [window_ close]; 694 [window_ close];
694 [animation_ setDelegate:nil]; 695 [animation_ setDelegate:nil];
695 [self release]; 696 [self release];
696 } 697 }
697 698
698 @end 699 @end
OLDNEW
« no previous file with comments | « ui/views/widget/native_widget_mac.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698