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

Side by Side Diff: chrome/browser/chrome_browser_main_mac.mm

Issue 941453002: mac: Tentative fix for Yosemite open file crash. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Remove trailing comma, just in case. Created 5 years, 10 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 (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 "chrome/browser/chrome_browser_main_mac.h" 5 #include "chrome/browser/chrome_browser_main_mac.h"
6 6
7 #import <Cocoa/Cocoa.h> 7 #import <Cocoa/Cocoa.h>
8 #include <sys/sysctl.h> 8 #include <sys/sysctl.h>
9 9
10 #include "base/command_line.h" 10 #include "base/command_line.h"
(...skipping 241 matching lines...) Expand 10 before | Expand all | Expand 10 after
252 // Prevent Cocoa from turning command-line arguments into 252 // Prevent Cocoa from turning command-line arguments into
253 // |-application:openFiles:|, since we already handle them directly. 253 // |-application:openFiles:|, since we already handle them directly.
254 // @"NO" looks like a mistake, but the value really is supposed to be a 254 // @"NO" looks like a mistake, but the value really is supposed to be a
255 // string. 255 // string.
256 @"NSTreatUnknownArgumentsAsOpen": @"NO", 256 @"NSTreatUnknownArgumentsAsOpen": @"NO",
257 // CoreAnimation has poor performance and CoreAnimation and 257 // CoreAnimation has poor performance and CoreAnimation and
258 // non-CoreAnimation exhibit window flickering when layers are not hosted 258 // non-CoreAnimation exhibit window flickering when layers are not hosted
259 // in the window server, which is the default when not not using the 259 // in the window server, which is the default when not not using the
260 // 10.9 SDK. 260 // 10.9 SDK.
261 // TODO: Remove this when we build with the 10.9 SDK. 261 // TODO: Remove this when we build with the 10.9 SDK.
262 @"NSWindowHostsLayersInWindowServer": @(base::mac::IsOSMavericksOrLater()) 262 @"NSWindowHostsLayersInWindowServer":
263 @(base::mac::IsOSMavericksOrLater()),
264 // This setting prevents views from ditching their layers when the view
265 // gets removed from the view hierarchy. It defaults to YES for
266 // applications linked against an OSX 10.8+ SDK. In Yosemite, failing to
267 // set this to YES causes an AppKit crash. http://crbug.com/428977
268 // TODO(erikchen): Remove this when we build with an OSX 10.8+ SDK.
269 @"NSViewKeepLayersAround": @(YES)
263 }]; 270 }];
264 } 271 }
265 272
266 void ChromeBrowserMainPartsMac::PostMainMessageLoopStart() { 273 void ChromeBrowserMainPartsMac::PostMainMessageLoopStart() {
267 MacStartupProfiler::GetInstance()->Profile( 274 MacStartupProfiler::GetInstance()->Profile(
268 MacStartupProfiler::POST_MAIN_MESSAGE_LOOP_START); 275 MacStartupProfiler::POST_MAIN_MESSAGE_LOOP_START);
269 ChromeBrowserMainPartsPosix::PostMainMessageLoopStart(); 276 ChromeBrowserMainPartsPosix::PostMainMessageLoopStart();
270 } 277 }
271 278
272 void ChromeBrowserMainPartsMac::PreProfileInit() { 279 void ChromeBrowserMainPartsMac::PreProfileInit() {
(...skipping 13 matching lines...) Expand all
286 MacStartupProfiler::POST_PROFILE_INIT); 293 MacStartupProfiler::POST_PROFILE_INIT);
287 ChromeBrowserMainPartsPosix::PostProfileInit(); 294 ChromeBrowserMainPartsPosix::PostProfileInit();
288 g_browser_process->metrics_service()->RecordBreakpadRegistration( 295 g_browser_process->metrics_service()->RecordBreakpadRegistration(
289 breakpad::IsCrashReporterEnabled()); 296 breakpad::IsCrashReporterEnabled());
290 } 297 }
291 298
292 void ChromeBrowserMainPartsMac::DidEndMainMessageLoop() { 299 void ChromeBrowserMainPartsMac::DidEndMainMessageLoop() {
293 AppController* appController = [NSApp delegate]; 300 AppController* appController = [NSApp delegate];
294 [appController didEndMainMessageLoop]; 301 [appController didEndMainMessageLoop];
295 } 302 }
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