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

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

Issue 1565243002: Fixes bug where client area would not get set correctly (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 11 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') | ui/views/widget/native_widget_private.h » ('j') | 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 121 matching lines...) Expand 10 before | Expand all | Expand 10 after
132 132
133 DCHECK(GetWidget()->GetRootView()); 133 DCHECK(GetWidget()->GetRootView());
134 bridge_->SetRootView(GetWidget()->GetRootView()); 134 bridge_->SetRootView(GetWidget()->GetRootView());
135 135
136 // "Infer" must be handled by ViewsDelegate::OnBeforeWidgetInit(). 136 // "Infer" must be handled by ViewsDelegate::OnBeforeWidgetInit().
137 DCHECK_NE(Widget::InitParams::INFER_OPACITY, params.opacity); 137 DCHECK_NE(Widget::InitParams::INFER_OPACITY, params.opacity);
138 bool translucent = params.opacity == Widget::InitParams::TRANSLUCENT_WINDOW; 138 bool translucent = params.opacity == Widget::InitParams::TRANSLUCENT_WINDOW;
139 bridge_->CreateLayer(params.layer_type, translucent); 139 bridge_->CreateLayer(params.layer_type, translucent);
140 } 140 }
141 141
142 void NativeWidgetMac::OnWidgetInitDone() {}
143
142 NonClientFrameView* NativeWidgetMac::CreateNonClientFrameView() { 144 NonClientFrameView* NativeWidgetMac::CreateNonClientFrameView() {
143 return new NativeFrameView(GetWidget()); 145 return new NativeFrameView(GetWidget());
144 } 146 }
145 147
146 bool NativeWidgetMac::ShouldUseNativeFrame() const { 148 bool NativeWidgetMac::ShouldUseNativeFrame() const {
147 return true; 149 return true;
148 } 150 }
149 151
150 bool NativeWidgetMac::ShouldWindowContentsBeTransparent() const { 152 bool NativeWidgetMac::ShouldWindowContentsBeTransparent() const {
151 // On Windows, this returns true when Aero is enabled which draws the titlebar 153 // On Windows, this returns true when Aero is enabled which draws the titlebar
(...skipping 567 matching lines...) Expand 10 before | Expand all | Expand 10 after
719 [[ViewsNSWindowCloseAnimator alloc] initWithWindow:window]; 721 [[ViewsNSWindowCloseAnimator alloc] initWithWindow:window];
720 } 722 }
721 723
722 - (void)animationDidEnd:(NSAnimation*)animation { 724 - (void)animationDidEnd:(NSAnimation*)animation {
723 [window_ close]; 725 [window_ close];
724 [animation_ setDelegate:nil]; 726 [animation_ setDelegate:nil];
725 [self release]; 727 [self release];
726 } 728 }
727 729
728 @end 730 @end
OLDNEW
« no previous file with comments | « ui/views/widget/native_widget_mac.h ('k') | ui/views/widget/native_widget_private.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698