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

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: respond to comments Created 8 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 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 <list>
Mihai Parparita -not on Chrome 2012/09/05 20:54:06 list and vector are unused.
koz (OOO until 15th September) 2012/09/06 07:50:44 Done.
13 #include <string>
14 #include <vector>
15
16 class PrefService;
Mihai Parparita -not on Chrome 2012/09/05 20:54:06 Ditto for the PrefService and ExtensionHost forwar
koz (OOO until 15th September) 2012/09/06 07:50:44 Done.
17 class Profile;
18
19 namespace extensions {
20
21 class ExtensionHost;
22
23 // Tracks what apps need to be restarted when the browser restarts.
24 class AppRestoreService : public ProfileKeyedService,
25 public content::NotificationObserver {
26 public:
27 explicit AppRestoreService(Profile* profile);
28
29 // Dispatches the app.runtime.onRestarted event to apps that were running in
30 // the last session.
31 void RestoreApps();
32
33 private:
34 // content::NotificationObserver.
35 virtual void Observe(int type,
36 const content::NotificationSource& source,
37 const content::NotificationDetails& details) OVERRIDE;
38
39 void RecordAppStart(const std::string& extension_id);
40 void RecordAppStop(const std::string& extension_id);
41 void RestoreApp(const std::string& extension_id);
42
43 content::NotificationRegistrar registrar_;
44 Profile* profile_;
45 };
46
47 } // namespace extensions
48
49 #endif // CHROME_BROWSER_EXTENSIONS_APP_RESTORE_SERVICE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698