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

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

Issue 2622083007: MacViews: Make window content views layer-backed. (Closed)
Patch Set: Created 3 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 | « no previous file | 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 #import "ui/views/cocoa/native_widget_mac_nswindow.h" 5 #import "ui/views/cocoa/native_widget_mac_nswindow.h"
6 6
7 #include "base/mac/foundation_util.h" 7 #include "base/mac/foundation_util.h"
8 #import "base/mac/sdk_forward_declarations.h" 8 #import "base/mac/sdk_forward_declarations.h"
9 #import "ui/views/cocoa/bridged_native_widget.h" 9 #import "ui/views/cocoa/bridged_native_widget.h"
10 #import "ui/base/cocoa/user_interface_item_command_handler.h" 10 #import "ui/base/cocoa/user_interface_item_command_handler.h"
(...skipping 23 matching lines...) Expand all
34 } 34 }
35 35
36 - (instancetype)initWithContentRect:(NSRect)contentRect 36 - (instancetype)initWithContentRect:(NSRect)contentRect
37 styleMask:(NSUInteger)windowStyle 37 styleMask:(NSUInteger)windowStyle
38 backing:(NSBackingStoreType)bufferingType 38 backing:(NSBackingStoreType)bufferingType
39 defer:(BOOL)deferCreation { 39 defer:(BOOL)deferCreation {
40 if ((self = [super initWithContentRect:contentRect 40 if ((self = [super initWithContentRect:contentRect
41 styleMask:windowStyle 41 styleMask:windowStyle
42 backing:bufferingType 42 backing:bufferingType
43 defer:deferCreation])) { 43 defer:deferCreation])) {
44 static_cast<NSView*>(self.contentView).wantsLayer = YES;
tapted 2017/01/13 00:22:37 ooh neat - I think this might fix http://crbug.com
44 commandDispatcher_.reset([[CommandDispatcher alloc] initWithOwner:self]); 45 commandDispatcher_.reset([[CommandDispatcher alloc] initWithOwner:self]);
45 } 46 }
46 return self; 47 return self;
47 } 48 }
48 49
49 // This override doesn't do anything, but keeping it helps diagnose lifetime 50 // This override doesn't do anything, but keeping it helps diagnose lifetime
50 // issues in crash stacktraces by inserting a symbol on NativeWidgetMacNSWindow. 51 // issues in crash stacktraces by inserting a symbol on NativeWidgetMacNSWindow.
51 - (void)dealloc { 52 - (void)dealloc {
52 [super dealloc]; 53 [super dealloc];
53 } 54 }
(...skipping 166 matching lines...) Expand 10 before | Expand all | Expand 10 after
220 id appController = [NSApp delegate]; 221 id appController = [NSApp delegate];
221 DCHECK([appController 222 DCHECK([appController
222 conformsToProtocol:@protocol(NSUserInterfaceValidations)]); 223 conformsToProtocol:@protocol(NSUserInterfaceValidations)]);
223 return [appController validateUserInterfaceItem:item]; 224 return [appController validateUserInterfaceItem:item];
224 } 225 }
225 226
226 return [super validateUserInterfaceItem:item]; 227 return [super validateUserInterfaceItem:item];
227 } 228 }
228 229
229 @end 230 @end
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698