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

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

Issue 800473006: Don't include hidden windows in IsAppWindowRegisteredInAnyProfile. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Address comments. Created 5 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
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 #import "chrome/browser/app_controller_mac.h" 5 #import "chrome/browser/app_controller_mac.h"
6 6
7 #include "base/auto_reset.h" 7 #include "base/auto_reset.h"
8 #include "base/bind.h" 8 #include "base/bind.h"
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 455 matching lines...) Expand 10 before | Expand all | Expand 10 after
466 browser_shutdown::SetTryingToQuit(false); 466 browser_shutdown::SetTryingToQuit(false);
467 467
468 // TODO(viettrungluu): Were we to remove Apple Event handlers above, we 468 // TODO(viettrungluu): Were we to remove Apple Event handlers above, we
469 // would have to reinstall them here. http://crbug.com/40861 469 // would have to reinstall them here. http://crbug.com/40861
470 } 470 }
471 } 471 }
472 472
473 - (NSApplicationTerminateReply)applicationShouldTerminate:(NSApplication*)app { 473 - (NSApplicationTerminateReply)applicationShouldTerminate:(NSApplication*)app {
474 // If there are no windows, quit immediately. 474 // If there are no windows, quit immediately.
475 if (chrome::BrowserIterator().done() && 475 if (chrome::BrowserIterator().done() &&
476 !AppWindowRegistryUtil::IsAppWindowRegisteredInAnyProfile(0)) { 476 !AppWindowRegistryUtil::IsAppWindowVisibleInAnyProfile(0)) {
477 return NSTerminateNow; 477 return NSTerminateNow;
478 } 478 }
479 479
480 // Check if the preference is turned on. 480 // Check if the preference is turned on.
481 const PrefService* prefs = g_browser_process->local_state(); 481 const PrefService* prefs = g_browser_process->local_state();
482 if (!prefs->GetBoolean(prefs::kConfirmToQuitEnabled)) { 482 if (!prefs->GetBoolean(prefs::kConfirmToQuitEnabled)) {
483 confirm_quit::RecordHistogram(confirm_quit::kNoConfirm); 483 confirm_quit::RecordHistogram(confirm_quit::kNoConfirm);
484 return NSTerminateNow; 484 return NSTerminateNow;
485 } 485 }
486 486
(...skipping 1256 matching lines...) Expand 10 before | Expand all | Expand 10 after
1743 1743
1744 //--------------------------------------------------------------------------- 1744 //---------------------------------------------------------------------------
1745 1745
1746 namespace app_controller_mac { 1746 namespace app_controller_mac {
1747 1747
1748 bool IsOpeningNewWindow() { 1748 bool IsOpeningNewWindow() {
1749 return g_is_opening_new_window; 1749 return g_is_opening_new_window;
1750 } 1750 }
1751 1751
1752 } // namespace app_controller_mac 1752 } // namespace app_controller_mac
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/apps/app_shim/app_shim_handler_mac.cc » ('j') | chrome/browser/apps/app_window_registry_util.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698