From 216e904053b111d31cf5fad355f2bb57743182cc Mon Sep 17 00:00:00 2001 From: "erg@chromium.org" Date: Thu, 29 Oct 2009 17:05:23 +0000 Subject: Fix window restore behaviour on Mac. On the mac, there can be no windows, but the application is sitll open. This confused "Restore the pages that were open last" so that it would restore when opening a new window. BUG=13341 TEST=Open chromium. Set On Startup to "Restore the pages that were open last". Open a few tabs. Close the window (but not chromium). Click the dock icon. The tabs shouldn't be restored. But if you quit chrome and start again, things should reopen. Review URL: http://codereview.chromium.org/340023 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@30463 0039d316-1c4b-4281-b951-d872f2087c98 --- chrome/browser/app_controller_cppsafe_mac.h | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 chrome/browser/app_controller_cppsafe_mac.h (limited to 'chrome/browser/app_controller_cppsafe_mac.h') diff --git a/chrome/browser/app_controller_cppsafe_mac.h b/chrome/browser/app_controller_cppsafe_mac.h new file mode 100644 index 0000000..da2aefb --- /dev/null +++ b/chrome/browser/app_controller_cppsafe_mac.h @@ -0,0 +1,19 @@ +// Copyright (c) 2009 The Chromium Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +#ifndef CHROME_BROWSER_APP_CONTROLLER_CPPSAFE_MAC_H_ +#define CHROME_BROWSER_APP_CONTROLLER_CPPSAFE_MAC_H_ + +// We declare this in a separate file that is safe for including in C++ code. + +namespace app_controller_mac { + +// True if we are currently handling an IDC_NEW_{TAB,WINDOW} command. Used in +// SessionService::Observe() to get around windows/linux and mac having +// different models of application lifetime. +bool IsOpeningNewWindow(); + +} // namespace app_controller_mac + +#endif // CHROME_BROWSER_APP_CONTROLLER_CPPSAFE_MAC_H_ -- cgit v1.1