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

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

Issue 903943002: Mac: Make content shell work with remote CoreAnimation (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Move to ContentMainRunnerImpl Created 5 years, 7 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 | content/app/content_main_runner.cc » ('j') | content/app/content_main_runner.cc » ('J')
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 8
9 #include "base/command_line.h" 9 #include "base/command_line.h"
10 #include "base/files/file_path.h" 10 #include "base/files/file_path.h"
(...skipping 138 matching lines...) Expand 10 before | Expand all | Expand 10 after
149 // change this, you'll probably need to change the Valgrind suppression. 149 // change this, you'll probably need to change the Valgrind suppression.
150 [nib instantiateNibWithOwner:NSApp topLevelObjects:nil]; 150 [nib instantiateNibWithOwner:NSApp topLevelObjects:nil];
151 // Make sure the app controller has been created. 151 // Make sure the app controller has been created.
152 DCHECK([NSApp delegate]); 152 DCHECK([NSApp delegate]);
153 153
154 [[NSUserDefaults standardUserDefaults] registerDefaults:@{ 154 [[NSUserDefaults standardUserDefaults] registerDefaults:@{
155 // Prevent Cocoa from turning command-line arguments into 155 // Prevent Cocoa from turning command-line arguments into
156 // |-application:openFiles:|, since we already handle them directly. 156 // |-application:openFiles:|, since we already handle them directly.
157 // @"NO" looks like a mistake, but the value really is supposed to be a 157 // @"NO" looks like a mistake, but the value really is supposed to be a
158 // string. 158 // string.
159 @"NSTreatUnknownArgumentsAsOpen": @"NO", 159 @"NSTreatUnknownArgumentsAsOpen": @"NO"
160 // CoreAnimation has poor performance and CoreAnimation and
161 // non-CoreAnimation exhibit window flickering when layers are not hosted
162 // in the window server, which is the default when not not using the
163 // 10.9 SDK.
164 // TODO: Remove this when we build with the 10.9 SDK.
165 @"NSWindowHostsLayersInWindowServer": @(base::mac::IsOSMavericksOrLater())
166 }]; 160 }];
167 } 161 }
168 162
169 void ChromeBrowserMainPartsMac::PostMainMessageLoopStart() { 163 void ChromeBrowserMainPartsMac::PostMainMessageLoopStart() {
170 MacStartupProfiler::GetInstance()->Profile( 164 MacStartupProfiler::GetInstance()->Profile(
171 MacStartupProfiler::POST_MAIN_MESSAGE_LOOP_START); 165 MacStartupProfiler::POST_MAIN_MESSAGE_LOOP_START);
172 ChromeBrowserMainPartsPosix::PostMainMessageLoopStart(); 166 ChromeBrowserMainPartsPosix::PostMainMessageLoopStart();
173 } 167 }
174 168
175 void ChromeBrowserMainPartsMac::PreProfileInit() { 169 void ChromeBrowserMainPartsMac::PreProfileInit() {
(...skipping 19 matching lines...) Expand all
195 // TODO(calamity): Make this gated on first_run::IsChromeFirstRun() in M45. 189 // TODO(calamity): Make this gated on first_run::IsChromeFirstRun() in M45.
196 content::BrowserThread::PostAfterStartupTask( 190 content::BrowserThread::PostAfterStartupTask(
197 FROM_HERE, base::ThreadTaskRunnerHandle::Get(), 191 FROM_HERE, base::ThreadTaskRunnerHandle::Get(),
198 base::Bind(&EnsureMetadataNeverIndexFile, user_data_dir())); 192 base::Bind(&EnsureMetadataNeverIndexFile, user_data_dir()));
199 } 193 }
200 194
201 void ChromeBrowserMainPartsMac::DidEndMainMessageLoop() { 195 void ChromeBrowserMainPartsMac::DidEndMainMessageLoop() {
202 AppController* appController = [NSApp delegate]; 196 AppController* appController = [NSApp delegate];
203 [appController didEndMainMessageLoop]; 197 [appController didEndMainMessageLoop];
204 } 198 }
OLDNEW
« no previous file with comments | « no previous file | content/app/content_main_runner.cc » ('j') | content/app/content_main_runner.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698