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

Unified Diff: chrome/browser/app_controller_mac.mm

Issue 23301018: Add quit item to app menu. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Sync and rebase Created 7 years, 4 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | chrome/browser/ui/cocoa/apps/app_shim_menu_controller_mac.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/app_controller_mac.mm
diff --git a/chrome/browser/app_controller_mac.mm b/chrome/browser/app_controller_mac.mm
index 34147c631f762cd7464502ce67f7c09f8574081e..214a6d59791ef4d5c8beae59537e234ed3177636 100644
--- a/chrome/browser/app_controller_mac.mm
+++ b/chrome/browser/app_controller_mac.mm
@@ -382,27 +382,12 @@ class AppControllerProfileObserver : public ProfileInfoCacheObserver {
}
- (NSApplicationTerminateReply)applicationShouldTerminate:(NSApplication*)app {
- using apps::ShellWindowRegistry;
-
// If there are no windows, quit immediately.
if (chrome::BrowserIterator().done() &&
- !ShellWindowRegistry::IsShellWindowRegisteredInAnyProfile(0)) {
+ !apps::ShellWindowRegistry::IsShellWindowRegisteredInAnyProfile(0)) {
return NSTerminateNow;
}
- // Check if this is a keyboard initiated quit on an app window. If so, quit
- // the app. This could cause the app to trigger another terminate, but that
- // will be caught by the no windows condition above.
- if ([[app currentEvent] type] == NSKeyDown) {
- apps::ShellWindow* shellWindow =
- ShellWindowRegistry::GetShellWindowForNativeWindowAnyProfile(
- [app keyWindow]);
- if (shellWindow) {
- apps::ExtensionAppShimHandler::QuitAppForWindow(shellWindow);
- return NSTerminateCancel;
- }
- }
-
// Check if the preference is turned on.
const PrefService* prefs = g_browser_process->local_state();
if (!prefs->GetBoolean(prefs::kConfirmToQuitEnabled)) {
« no previous file with comments | « no previous file | chrome/browser/ui/cocoa/apps/app_shim_menu_controller_mac.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698