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: chrome/browser/chrome_browser_main_mac.mm

Issue 9230011: Better fix for Lion dictionary popover cmd-W bug. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 8 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 | Annotate | Revision Log
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/debug/debugger.h" 10 #include "base/debug/debugger.h"
(...skipping 84 matching lines...) Expand 10 before | Expand all | Expand 10 after
95 95
96 // Now load the nib (from the right bundle). 96 // Now load the nib (from the right bundle).
97 scoped_nsobject<NSNib> 97 scoped_nsobject<NSNib>
98 nib([[NSNib alloc] initWithNibNamed:@"MainMenu" 98 nib([[NSNib alloc] initWithNibNamed:@"MainMenu"
99 bundle:base::mac::MainAppBundle()]); 99 bundle:base::mac::MainAppBundle()]);
100 // TODO(viettrungluu): crbug.com/20504 - This currently leaks, so if you 100 // TODO(viettrungluu): crbug.com/20504 - This currently leaks, so if you
101 // change this, you'll probably need to change the Valgrind suppression. 101 // change this, you'll probably need to change the Valgrind suppression.
102 [nib instantiateNibWithOwner:NSApp topLevelObjects:nil]; 102 [nib instantiateNibWithOwner:NSApp topLevelObjects:nil];
103 // Make sure the app controller has been created. 103 // Make sure the app controller has been created.
104 DCHECK([NSApp delegate]); 104 DCHECK([NSApp delegate]);
105 DCHECK([[NSApp delegate] isKindOfClass:[AppController class]]);
106 [[NSApp delegate] registerEventHandlersAndInitialize];
107 105
108 // This is a no-op if the KeystoneRegistration framework is not present. 106 // This is a no-op if the KeystoneRegistration framework is not present.
109 // The framework is only distributed with branded Google Chrome builds. 107 // The framework is only distributed with branded Google Chrome builds.
110 [[KeystoneGlue defaultKeystoneGlue] registerWithKeystone]; 108 [[KeystoneGlue defaultKeystoneGlue] registerWithKeystone];
111 109
112 // Prevent Cocoa from turning command-line arguments into 110 // Prevent Cocoa from turning command-line arguments into
113 // |-application:openFiles:|, since we already handle them directly. 111 // |-application:openFiles:|, since we already handle them directly.
114 [[NSUserDefaults standardUserDefaults] 112 [[NSUserDefaults standardUserDefaults]
115 setObject:@"NO" forKey:@"NSTreatUnknownArgumentsAsOpen"]; 113 setObject:@"NO" forKey:@"NSTreatUnknownArgumentsAsOpen"];
116 } 114 }
117 115
118 void ChromeBrowserMainPartsMac::ShowMissingLocaleMessageBox() { 116 void ChromeBrowserMainPartsMac::ShowMissingLocaleMessageBox() {
119 // Not called on Mac because we load the locale files differently. 117 // Not called on Mac because we load the locale files differently.
120 NOTREACHED(); 118 NOTREACHED();
121 } 119 }
122 120
123 void ChromeBrowserMainPartsMac::DidEndMainMessageLoop() { 121 void ChromeBrowserMainPartsMac::DidEndMainMessageLoop() {
124 AppController* appController = [NSApp delegate]; 122 AppController* appController = [NSApp delegate];
125 [appController didEndMainMessageLoop]; 123 [appController didEndMainMessageLoop];
126 } 124 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698