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

Unified Diff: chrome/browser/lifetime/application_lifetime_desktop.h

Issue 1382563002: Split the desktop portion of application_lifetime.cc into its own file. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/lifetime/application_lifetime_desktop.h
diff --git a/chrome/browser/lifetime/application_lifetime.h b/chrome/browser/lifetime/application_lifetime_desktop.h
similarity index 64%
copy from chrome/browser/lifetime/application_lifetime.h
copy to chrome/browser/lifetime/application_lifetime_desktop.h
index 3cf18549cd37768132f3af62cd9e806c18beded3..8b998cb8f2ce45def7b77c2f6c5dcfb3596a4006 100644
--- a/chrome/browser/lifetime/application_lifetime.h
+++ b/chrome/browser/lifetime/application_lifetime_desktop.h
@@ -1,11 +1,15 @@
-// Copyright (c) 2012 The Chromium Authors. All rights reserved.
+// Copyright 2015 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_LIFETIME_APPLICATION_LIFETIME_H_
-#define CHROME_BROWSER_LIFETIME_APPLICATION_LIFETIME_H_
+#ifndef CHROME_BROWSER_LIFETIME_APPLICATION_LIFETIME_DESKTOP_H_
+#define CHROME_BROWSER_LIFETIME_APPLICATION_LIFETIME_DESKTOP_H_
-#include "base/compiler_specific.h"
+#include "base/basictypes.h"
+
+#if defined(OS_ANDROID) || defined(OS_IOS)
+#error Not used on mobile
+#endif
class Browser;
@@ -18,58 +22,6 @@ namespace chrome {
// SIGTERM to start actual exit process.
void AttemptUserExit();
-// Starts to collect shutdown traces. On ChromeOS this will start immediately
-// on AttemptUserExit() and all other systems will start once all tabs are
-// closed.
-void StartShutdownTracing();
-
-// Starts a user initiated restart process. On platforms other than
-// chromeos, this sets a restart bit in the preference so that
-// chrome will be restarted at the end of shutdown process. On
-// ChromeOS, this simply exits the chrome, which lets sesssion
-// manager re-launch the browser with restore last session flag.
-void AttemptRestart();
-
-#if defined(OS_WIN)
-enum AshExecutionStatus {
- ASH_KEEP_RUNNING,
- ASH_TERMINATE,
-};
-
-// Helper function to activate the desktop from Ash mode. The
-// |ash_execution_status| parameter indicates if we should exit Ash after
-// activating desktop.
-void ActivateDesktopHelper(AshExecutionStatus ash_execution_status);
-
-// Windows 7/8 specific: Like AttemptRestart but if chrome is running
-// in desktop mode it starts in metro mode and vice-versa. The switching like
-// the restarting is controlled by a preference.
-void AttemptRestartToDesktopMode();
-// Launches Chrome into Windows 8 metro mode on Windows 8. On Windows 7 it
-// launches Chrome into Windows ASH.
-void AttemptRestartToMetroMode();
-#endif
-
-// Attempt to exit by closing all browsers. This is equivalent to
-// CloseAllBrowsers() on platforms where the application exits
-// when no more windows are remaining. On other platforms (the Mac),
-// this will additionally exit the application if all browsers are
-// successfully closed.
-// Note that he exit process may be interrupted by download or
-// unload handler, and the browser may or may not exit.
-void AttemptExit();
-
-#if defined(OS_CHROMEOS)
-// Shutdown chrome cleanly without blocking. This is called
-// when SIGTERM is received on Chrome OS, and always sets
-// exit-cleanly bit and exits the browser, even if there is
-// ongoing downloads or a page with onbeforeunload handler.
-//
-// If you need to exit or restart in your code on ChromeOS,
-// use AttemptExit or AttemptRestart respectively.
-void ExitCleanly();
-#endif
-
// Closes all browsers and if successful, quits.
void CloseAllBrowsersAndQuit();
@@ -79,9 +31,6 @@ void CloseAllBrowsersAndQuit();
// browser windows keeping it alive or the application is quitting.
void CloseAllBrowsers();
-// Begins shutdown of the application when the desktop session is ending.
-void SessionEnding();
-
// Tells the BrowserList to keep the application alive after the last Browser
// closes. This is implemented as a count, so callers should pair their calls
// to IncrementKeepAliveCount() with matching calls to DecrementKeepAliveCount()
@@ -97,17 +46,6 @@ void DecrementKeepAliveCount();
// closes.
bool WillKeepAlive();
-// Emits APP_TERMINATING notification. It is guaranteed that the
-// notification is sent only once.
-void NotifyAppTerminating();
-
-// Send out notifications.
-// For ChromeOS, also request session manager to end the session.
-void NotifyAndTerminate(bool fast_path);
-
-// Called once the application is exiting.
-void OnAppExiting();
-
// Called once the application is exiting to do any platform specific
// processing required.
void HandleAppExitingForPlatform();
@@ -119,6 +57,37 @@ bool ShouldStartShutdown(Browser* browser);
// Disable browser shutdown for unit tests.
void DisableShutdownForTesting(bool disable_shutdown_for_testing);
+#if defined(OS_CHROMEOS)
+// Shutdown chrome cleanly without blocking. This is called
+// when SIGTERM is received on Chrome OS, and always sets
+// exit-cleanly bit and exits the browser, even if there is
+// ongoing downloads or a page with onbeforeunload handler.
+//
+// If you need to exit or restart in your code on ChromeOS,
+// use AttemptExit or AttemptRestart respectively.
+void ExitCleanly();
+#endif
+
+#if defined(OS_WIN)
+enum AshExecutionStatus {
+ ASH_KEEP_RUNNING,
+ ASH_TERMINATE,
+};
+
+// Helper function to activate the desktop from Ash mode. The
+// |ash_execution_status| parameter indicates if we should exit Ash after
+// activating desktop.
+void ActivateDesktopHelper(AshExecutionStatus ash_execution_status);
+
+// Windows 7/8 specific: Like AttemptRestart but if chrome is running
+// in desktop mode it starts in metro mode and vice-versa. The switching like
+// the restarting is controlled by a preference.
+void AttemptRestartToDesktopMode();
+// Launches Chrome into Windows 8 metro mode on Windows 8. On Windows 7 it
+// launches Chrome into Windows ASH.
+void AttemptRestartToMetroMode();
+#endif
+
} // namespace chrome
-#endif // CHROME_BROWSER_LIFETIME_APPLICATION_LIFETIME_H_
+#endif // CHROME_BROWSER_LIFETIME_APPLICATION_LIFETIME_DESKTOP_H_
« no previous file with comments | « chrome/browser/lifetime/application_lifetime.cc ('k') | chrome/browser/lifetime/application_lifetime_desktop.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698