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

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

Issue 8771028: [Mac] Remove content/ CrApplication. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Merge to trunk for commit-queue. Created 9 years 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 | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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/debug/debugger.h" 10 #include "base/debug/debugger.h"
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after
64 64
65 // Tell Cooca to finish its initialization, which we want to do manually 65 // Tell Cooca to finish its initialization, which we want to do manually
66 // instead of calling NSApplicationMain(). The primary reason is that NSAM() 66 // instead of calling NSApplicationMain(). The primary reason is that NSAM()
67 // never returns, which would leave all the objects currently on the stack 67 // never returns, which would leave all the objects currently on the stack
68 // in scoped_ptrs hanging and never cleaned up. We then load the main nib 68 // in scoped_ptrs hanging and never cleaned up. We then load the main nib
69 // directly. The main event loop is run from common code using the 69 // directly. The main event loop is run from common code using the
70 // MessageLoop API, which works out ok for us because it's a wrapper around 70 // MessageLoop API, which works out ok for us because it's a wrapper around
71 // CFRunLoop. 71 // CFRunLoop.
72 72
73 // Initialize NSApplication using the custom subclass. 73 // Initialize NSApplication using the custom subclass.
74 [BrowserCrApplication sharedApplication]; 74 chrome_browser_application_mac::RegisterBrowserCrApp();
75 75
76 // If ui_task is not NULL, the app is actually a browser_test, so startup is 76 // If ui_task is not NULL, the app is actually a browser_test, so startup is
77 // handled outside of BrowserMain (which is what called this). 77 // handled outside of BrowserMain (which is what called this).
78 if (!parameters().ui_task) { 78 if (!parameters().ui_task) {
79 // The browser process only wants to support the language Cocoa will use, 79 // The browser process only wants to support the language Cocoa will use,
80 // so force the app locale to be overriden with that value. 80 // so force the app locale to be overriden with that value.
81 l10n_util::OverrideLocaleWithCocoaLocale(); 81 l10n_util::OverrideLocaleWithCocoaLocale();
82 82
83 // Before we load the nib, we need to start up the resource bundle so we 83 // Before we load the nib, we need to start up the resource bundle so we
84 // have the strings avaiable for localization. 84 // have the strings avaiable for localization.
(...skipping 30 matching lines...) Expand all
115 115
116 void ChromeBrowserMainPartsMac::ShowMissingLocaleMessageBox() { 116 void ChromeBrowserMainPartsMac::ShowMissingLocaleMessageBox() {
117 // Not called on Mac because we load the locale files differently. 117 // Not called on Mac because we load the locale files differently.
118 NOTREACHED(); 118 NOTREACHED();
119 } 119 }
120 120
121 void ChromeBrowserMainPartsMac::DidEndMainMessageLoop() { 121 void ChromeBrowserMainPartsMac::DidEndMainMessageLoop() {
122 AppController* appController = [NSApp delegate]; 122 AppController* appController = [NSApp delegate];
123 [appController didEndMainMessageLoop]; 123 [appController didEndMainMessageLoop];
124 } 124 }
OLDNEW
« no previous file with comments | « chrome/browser/chrome_browser_application_mac_unittest.mm ('k') | chrome/browser/tab_contents/tab_contents_view_mac.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698