summaryrefslogtreecommitdiffstats
path: root/chrome/browser/app_controller_cppsafe_mac.h
diff options
context:
space:
mode:
authorerg@chromium.org <erg@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-10-29 17:05:23 +0000
committererg@chromium.org <erg@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-10-29 17:05:23 +0000
commit216e904053b111d31cf5fad355f2bb57743182cc (patch)
treefb3cc29c35622a2b75b435fd61eb6d7352ed4dd0 /chrome/browser/app_controller_cppsafe_mac.h
parent5c558bc54d375335982ebcd947840a9a1f4eab40 (diff)
downloadchromium_src-216e904053b111d31cf5fad355f2bb57743182cc.zip
chromium_src-216e904053b111d31cf5fad355f2bb57743182cc.tar.gz
chromium_src-216e904053b111d31cf5fad355f2bb57743182cc.tar.bz2
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
Diffstat (limited to 'chrome/browser/app_controller_cppsafe_mac.h')
-rw-r--r--chrome/browser/app_controller_cppsafe_mac.h19
1 files changed, 19 insertions, 0 deletions
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_