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

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

Issue 3175038: Allow overriding of X error functions (Closed)
Patch Set: Messed up #ifdef Created 10 years, 3 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 | « chrome/app/chrome_dll_main.cc ('k') | chrome/browser/browser_list.h » ('j') | 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) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 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 #import "chrome/browser/app_controller_mac.h" 5 #import "chrome/browser/app_controller_mac.h"
6 6
7 #include "app/l10n_util.h" 7 #include "app/l10n_util.h"
8 #include "app/l10n_util_mac.h" 8 #include "app/l10n_util_mac.h"
9 #include "base/auto_reset.h" 9 #include "base/auto_reset.h"
10 #include "base/command_line.h" 10 #include "base/command_line.h"
(...skipping 228 matching lines...) Expand 10 before | Expand all | Expand 10 after
239 239
240 // TODO(viettrungluu): Remove Apple Event handlers here? (It's safe to leave 240 // TODO(viettrungluu): Remove Apple Event handlers here? (It's safe to leave
241 // them in, but I'm not sure about UX; we'd also want to disable other things 241 // them in, but I'm not sure about UX; we'd also want to disable other things
242 // though.) http://crbug.com/40861 242 // though.) http://crbug.com/40861
243 243
244 size_t num_browsers = BrowserList::size(); 244 size_t num_browsers = BrowserList::size();
245 245
246 // Initiate a shutdown (via BrowserList::CloseAllBrowsers()) if we aren't 246 // Initiate a shutdown (via BrowserList::CloseAllBrowsers()) if we aren't
247 // already shutting down. 247 // already shutting down.
248 if (!browser_shutdown::IsTryingToQuit()) 248 if (!browser_shutdown::IsTryingToQuit())
249 BrowserList::CloseAllBrowsers(true); 249 BrowserList::CloseAllBrowsers();
250 250
251 return num_browsers == 0 ? YES : NO; 251 return num_browsers == 0 ? YES : NO;
252 } 252 }
253 253
254 - (void)stopTryingToTerminateApplication:(NSApplication*)app { 254 - (void)stopTryingToTerminateApplication:(NSApplication*)app {
255 if (browser_shutdown::IsTryingToQuit()) { 255 if (browser_shutdown::IsTryingToQuit()) {
256 // Reset the "trying to quit" state, so that closing all browser windows 256 // Reset the "trying to quit" state, so that closing all browser windows
257 // will no longer lead to termination. 257 // will no longer lead to termination.
258 browser_shutdown::SetTryingToQuit(false); 258 browser_shutdown::SetTryingToQuit(false);
259 259
(...skipping 837 matching lines...) Expand 10 before | Expand all | Expand 10 after
1097 [appController showPreferencesWindow:nil page:page profile:profile]; 1097 [appController showPreferencesWindow:nil page:page profile:profile];
1098 } 1098 }
1099 1099
1100 namespace app_controller_mac { 1100 namespace app_controller_mac {
1101 1101
1102 bool IsOpeningNewWindow() { 1102 bool IsOpeningNewWindow() {
1103 return g_is_opening_new_window; 1103 return g_is_opening_new_window;
1104 } 1104 }
1105 1105
1106 } // namespace app_controller_mac 1106 } // namespace app_controller_mac
OLDNEW
« no previous file with comments | « chrome/app/chrome_dll_main.cc ('k') | chrome/browser/browser_list.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698