summaryrefslogtreecommitdiffstats
path: root/apps/app_restore_service.h
diff options
context:
space:
mode:
Diffstat (limited to 'apps/app_restore_service.h')
-rw-r--r--apps/app_restore_service.h20
1 files changed, 8 insertions, 12 deletions
diff --git a/apps/app_restore_service.h b/apps/app_restore_service.h
index d4e605f..65d3de2 100644
--- a/apps/app_restore_service.h
+++ b/apps/app_restore_service.h
@@ -8,7 +8,6 @@
#include <string>
#include <vector>
-#include "apps/app_lifetime_monitor.h"
#include "chrome/browser/extensions/shell_window_registry.h"
#include "components/browser_context_keyed_service/browser_context_keyed_service.h"
#include "content/public/browser/notification_observer.h"
@@ -25,7 +24,7 @@ namespace apps {
// Tracks what apps need to be restarted when the browser restarts.
class AppRestoreService : public BrowserContextKeyedService,
public content::NotificationObserver,
- public AppLifetimeMonitor::Observer {
+ public extensions::ShellWindowRegistry::Observer {
public:
// Returns true if apps should be restored on the current platform, given
// whether this new browser process launched due to a restart.
@@ -43,25 +42,22 @@ class AppRestoreService : public BrowserContextKeyedService,
const content::NotificationSource& source,
const content::NotificationDetails& details) OVERRIDE;
- // AppLifetimeMonitor::Observer.
- virtual void OnAppStart(Profile* profile, const std::string& app_id) OVERRIDE;
- virtual void OnAppActivated(Profile* profile,
- const std::string& app_id) OVERRIDE;
- virtual void OnAppDeactivated(Profile* profile,
- const std::string& app_id) OVERRIDE;
- virtual void OnAppStop(Profile* profile, const std::string& app_id) OVERRIDE;
+ // extensions::ShellWindowRegistry::Observer.
+ virtual void OnShellWindowAdded(ShellWindow* shell_window) OVERRIDE;
+ virtual void OnShellWindowIconChanged(ShellWindow* shell_window) OVERRIDE;
+ virtual void OnShellWindowRemoved(ShellWindow* shell_window) OVERRIDE;
// BrowserContextKeyedService.
virtual void Shutdown() OVERRIDE;
void RecordAppStart(const std::string& extension_id);
void RecordAppStop(const std::string& extension_id);
- void RecordAppActiveState(const std::string& id, bool is_active);
+ void RecordIfAppHasWindows(const std::string& id);
void RestoreApp(const extensions::Extension* extension);
- void StartObservingAppLifetime();
- void StopObservingAppLifetime();
+ void StartObservingShellWindows();
+ void StopObservingShellWindows();
content::NotificationRegistrar registrar_;
Profile* profile_;