1 // Copyright 2015 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
5 #ifndef CHROMECAST_CRASH_APP_STATE_TRACKER_H_
6 #define CHROMECAST_CRASH_APP_STATE_TRACKER_H_
10 namespace chromecast
{
12 class AppStateTracker
{
14 // Record |app_id| as the last app that attempted to launch.
15 static void SetLastLaunchedApp(const std::string
& app_id
);
17 // The current app becomes the previous app, |app_id| becomes the current app.
18 static void SetCurrentApp(const std::string
& app_id
);
20 // Returns the id of the app that was last attempted to launch.
21 static std::string
GetLastLaunchedApp();
23 // Returns the id of the active app.
24 static std::string
GetCurrentApp();
26 // Returns the id of the app which was previously active.
27 static std::string
GetPreviousApp();
30 } // namespace chromecast
32 #endif // CHROMECAST_CRASH_APP_STATE_TRACKER_H_