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

Side by Side Diff: chrome/browser/extensions/app_restore_service.h

Issue 10875027: Restart running apps when chrome restarts. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 8 years, 2 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
(Empty)
1 // Copyright (c) 2012 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.
4
5 #ifndef CHROME_BROWSER_EXTENSIONS_APP_RESTORE_SERVICE_H_
6 #define CHROME_BROWSER_EXTENSIONS_APP_RESTORE_SERVICE_H_
7
8 #include "chrome/browser/profiles/profile_keyed_service.h"
9 #include "content/public/browser/notification_observer.h"
10 #include "content/public/browser/notification_registrar.h"
11
12 #include <string>
13
14 class Profile;
15
16 namespace extensions {
17
18 class Extension;
19
20 // Tracks what apps need to be restarted when the browser restarts.
21 class AppRestoreService : public ProfileKeyedService,
22 public content::NotificationObserver {
23 public:
24 explicit AppRestoreService(Profile* profile);
25
26 // Dispatches the app.runtime.onRestarted event to apps that were running in
27 // the last session.
28 void RestoreApps();
29
30 private:
31 // content::NotificationObserver.
32 virtual void Observe(int type,
33 const content::NotificationSource& source,
34 const content::NotificationDetails& details) OVERRIDE;
35
36 void RecordAppStart(const std::string& extension_id);
37 void RecordAppStop(const std::string& extension_id);
38 void RestoreApp(const Extension* extension);
39
40 content::NotificationRegistrar registrar_;
41 Profile* profile_;
42 };
43
44 } // namespace extensions
45
46 #endif // CHROME_BROWSER_EXTENSIONS_APP_RESTORE_SERVICE_H_
OLDNEW
« no previous file with comments | « chrome/browser/extensions/api/app_runtime/app_runtime_api.cc ('k') | chrome/browser/extensions/app_restore_service.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698