Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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 "content/app/mac/mac_init.h" | 5 #include "content/app/mac/mac_init.h" |
| 6 | 6 |
| 7 #import <Cocoa/Cocoa.h> | 7 #import <Cocoa/Cocoa.h> |
| 8 | 8 |
| 9 #include "base/mac/mac_util.h" | |
| 10 | |
| 11 namespace content { | 9 namespace content { |
| 12 | 10 |
| 13 void InitializeMac() { | 11 void InitializeMac() { |
| 14 [[NSUserDefaults standardUserDefaults] registerDefaults:@{ | 12 [[NSUserDefaults standardUserDefaults] registerDefaults:@{ |
| 15 // Exceptions routed to -[NSApplication reportException:] should crash | 13 // Exceptions routed to -[NSApplication reportException:] should crash |
| 16 // immediately, as opposed being swallowed or presenting UI that gives the | 14 // immediately, as opposed being swallowed or presenting UI that gives the |
| 17 // user a choice in the matter. | 15 // user a choice in the matter. |
| 18 @"NSApplicationCrashOnExceptions": @YES, | 16 @"NSApplicationCrashOnExceptions": @YES, |
| 19 | 17 |
| 20 // Prevent Cocoa from turning command-line arguments into -[NSApplication | 18 // Prevent Cocoa from turning command-line arguments into -[NSApplication |
| 21 // application:openFile:], because they are handled directly. @"NO" looks | 19 // application:openFile:], because they are handled directly. @"NO" looks |
| 22 // like a mistake, but the value really is supposed to be a string. | 20 // like a mistake, but the value really is supposed to be a string. |
| 23 @"NSTreatUnknownArgumentsAsOpen": @"NO", | 21 @"NSTreatUnknownArgumentsAsOpen": @"NO", |
| 24 | 22 |
| 25 // CoreAnimation has poor performance and CoreAnimation and | 23 // CoreAnimation has poor performance and CoreAnimation and |
| 26 // non-CoreAnimation exhibit window flickering when layers are not hosted | 24 // non-CoreAnimation exhibit window flickering when layers are not hosted |
| 27 // in the window server, which is the default when not not using the | 25 // in the window server, which is the default when not not using the |
| 28 // 10.9 SDK. | 26 // 10.9 SDK. |
| 29 // TODO: Remove this when we build with the 10.9 SDK. | 27 // TODO: Remove this when we build with the 10.9 SDK. |
|
Nico
2016/07/08 18:32:39
If this actually means "build with 10.9 SDK" and n
Mark Mentovai
2016/07/08 18:38:42
Nico wrote:
| |
| 30 @"NSWindowHostsLayersInWindowServer": @(base::mac::IsOSMavericksOrLater()) | 28 @"NSWindowHostsLayersInWindowServer": @YES |
| 31 }]; | 29 }]; |
| 32 } | 30 } |
| 33 | 31 |
| 34 } // namespace content | 32 } // namespace content |
| OLD | NEW |